diff options
author | Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> | 2015-03-03 09:54:41 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-05-04 11:49:46 +0200 |
commit | 6d56cb94f4eadd3f336e34a1da7be9e9e987f0b0 (patch) | |
tree | da5bd168888d8f25f703dc08b1bc2e58a598c86d | |
parent | f2efcbce549440344368ee59910b698d039852b5 (diff) | |
download | lwn-6d56cb94f4eadd3f336e34a1da7be9e9e987f0b0.tar.gz lwn-6d56cb94f4eadd3f336e34a1da7be9e9e987f0b0.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: Jiri Slaby <jslaby@suse.cz>
-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 59200ee275e5..563d7d883ac4 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -355,6 +355,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; |