x86/hvm: don't discard the SW/HW event distinction from the emulator
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Sep 2014 08:22:23 +0000 (10:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Sep 2014 08:22:23 +0000 (10:22 +0200)
commitecf5678200ad2642b69ffea47ad138190bc3e190
tree873f3b5098a2ec323485951350bda563d4c01d69
parent7dfa94c6212b979cbfc8cff5ad5336922f4809d9
x86/hvm: don't discard the SW/HW event distinction from the emulator

Injecting emulator software events as hardware exceptions results in a bypass
of DPL checks.  As the emulator doesn't perform DPL checks itself, guest
userspace is capable of bypassing DPL checks and injecting arbitrary events.

Propagating software event information from the emulator allows VMX to now
properly inject software events, including DPL and presence checks, as well
correct fault/trap frames.

Reported-by: Andrei LUTAS <vlutas@bitdefender.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Andrei LUTAS <vlutas@bitdefender.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/io.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/realmode.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/asm-x86/hvm/emulate.h