]> git.proxmox.com Git - mirror_qemu.git/commit - target-i386/kvm.c
kvm: x86: Fix initial kvm_has_msr_star
authorJan Kiszka <jan.kiszka@web.de>
Sun, 6 Dec 2009 14:51:24 +0000 (15:51 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 7 Dec 2009 14:45:47 +0000 (08:45 -0600)
commit6fb6d245546d3ae48c4cb764b3593e4739aa1364
treecb4ce6d604e999c1b538fd9f2f031a01831f4ea7
parent5d7ff5bbde21858b43af38e7cb5cae59bd4668ad
kvm: x86: Fix initial kvm_has_msr_star

KVM_GET_MSR_INDEX_LIST returns -E2BIG when the provided space is too
small for all MSRs. But this is precisely the error we trigger with the
initial request in order to obtain that size. Do not fail in that case.

This caused a subtle corruption of the guest state as MSR_STAR was not
properly saved/restored. The corruption became visible with latest kvm
optimizing the MSR updates.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-i386/kvm.c