]> git.ipfire.org Git - thirdparty/qemu.git/commit
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 22:36:46 +0000 (16:36 -0600)
commit20c1a35211a2500935e15b5f30a98b555ebeb2ff
tree093a2d5a12b3e5d320794d23d3032020e37360c1
parentea6112b1659ea0f0879302288496c4e0dea6f723
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>
(cherry picked from commit 6fb6d245546d3ae48c4cb764b3593e4739aa1364)
target-i386/kvm.c