OSDN Git Service

KVM: vmx: add support for emulating UMIP
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Jul 2016 08:44:55 +0000 (10:44 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Dec 2017 08:26:40 +0000 (09:26 +0100)
commit0367f205a3b7c0efe774634eef1f4697c79a4132
tree15ce5791e2bf606791f32b85a8bb9425291302b2
parent66336cab3531d3325ebde36a04725dddd0c42cb5
KVM: vmx: add support for emulating UMIP

UMIP can be emulated almost perfectly on Intel processor by enabling
descriptor-table exits.  SMSW does not cause a vmexit and hence it
cannot be changed into a #GP fault, but all in all it's the most
"innocuous" of the unprivileged instructions that UMIP blocks.

In fact, Linux is _also_ emulating SMSW instructions on behalf of the
program that executes them, because some 16-bit programs expect to use
SMSW to detect vm86 mode, so this is an even smaller issue.

Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c