[PATCH 0/9] KVM: x86: Fixes for various emulator bugs

From: Nadav Amit
Date: Mon Jun 02 2014 - 11:34:37 EST


The x86 emulator of KVM is buggy. This series of patches includes fixes for
various bugs which were detected. Each patch stands on its own. Two patches do
not fix KVM emulation, but cause the emulator to fail more nicely by returning
an unhandlable error, instead of performing wrong emulation (VEX-prefix and
cmpxchg16b). The fix for rdpmc is a bit intrusive to keep SVM behavior intact.

Thanks for reviewing the patches.

Nadav Amit (9):
KVM: x86: Mark VEX-prefix instructions emulation as unimplemented
KVM: x86: Emulator ignores LDTR/TR extended base on LLDT/LTR
KVM: x86: Loading segments on 64-bit mode may be wrong
KVM: x86: sgdt and sidt are not privilaged
KVM: x86: cmpxchg emulation should compare in reverse order
KVM: x86: movnti minimum op size of 32-bit is not kept
KVM: x86: rdpmc emulation checks the counter incorrectly
KVM: x86: Return error on cmpxchg16b emulation
KVM: x86: smsw emulation is incorrect in 64-bit mode

arch/x86/include/asm/kvm_emulate.h | 1 +
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/emulate.c | 44 ++++++++++++++++++++++++++++----------
arch/x86/kvm/pmu.c | 9 ++++++++
arch/x86/kvm/x86.c | 7 ++++++
5 files changed, 51 insertions(+), 11 deletions(-)

--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/