diff options
author | Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> | 2015-03-03 09:54:41 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-08-07 00:32:00 +0100 |
commit | 3e8e73f832aec6c73a61fb3f53816bf4ee37c723 (patch) | |
tree | 8172789f48310f20d07be82e689d9d3878f1c933 /arch | |
parent | f655adbac3de7ce92b2b0f9ce2d426b55b600e38 (diff) | |
download | linux-stable-3e8e73f832aec6c73a61fb3f53816bf4ee37c723.tar.gz linux-stable-3e8e73f832aec6c73a61fb3f53816bf4ee37c723.tar.bz2 linux-stable-3e8e73f832aec6c73a61fb3f53816bf4ee37c723.zip |
KVM: s390: Zero out current VMDB of STSI before including level3 data.
commit b75f4c9afac2604feb971441116c07a24ecca1ec upstream.
s390 documentation requires words 0 and 10-15 to be reserved and stored as
zeros. As we fill out all other fields, we can memset the full structure.
Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kvm/priv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index d02638959922..c593e1efb4d0 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -219,6 +219,7 @@ static void handle_stsi_3_2_2(struct kvm_vcpu *vcpu, struct sysinfo_3_2_2 *mem) for (n = mem->count - 1; n > 0 ; n--) memcpy(&mem->vm[n], &mem->vm[n - 1], sizeof(mem->vm[0])); + memset(&mem->vm[0], 0, sizeof(mem->vm[0])); mem->vm[0].cpus_total = cpus; mem->vm[0].cpus_configured = cpus; mem->vm[0].cpus_standby = 0; |