diff options
author | Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> | 2015-03-03 11:54:41 +0300 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2015-03-06 15:40:28 +0300 |
commit | b75f4c9afac2604feb971441116c07a24ecca1ec (patch) | |
tree | a1452bd0750e85297c5f2ff4c6abecb438d4cd13 | |
parent | fb5bf93f84c277546473be35543ed7890f6e6742 (diff) | |
download | linux-b75f4c9afac2604feb971441116c07a24ecca1ec.tar.xz |
KVM: s390: Zero out current VMDB of STSI before including level3 data.
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>
Cc: stable@vger.kernel.org
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-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 351116939ea2..c7fee9db332a 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -467,6 +467,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; |