]> xenbits.xensource.com Git - xen.git/commit
x86/emulate: support for emulating software event injection
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Sep 2014 08:23:01 +0000 (10:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Sep 2014 08:23:01 +0000 (10:23 +0200)
commit36ebf14ebe60310aa22952cbb94de951c158437d
tree3ef8146479bc892ecac92f908b14766fc17ca6b5
parentecf5678200ad2642b69ffea47ad138190bc3e190
x86/emulate: support for emulating software event injection

AMD SVM requires all software events to have their injection emulated if
hardware lacks NextRIP support.  In addition, `icebp` (opcode 0xf1) injection
requires emulation in all cases, even with hardware NextRIP support.

Emulating full control transfers is overkill for our needs.  All that matters
is that guest userspace can't bypass the descriptor DPL check.  Any guest OS
which would incur other faults as part of injection is going to end up with a
double fault instead, and won't be in a position to care that the faulting eip
is wrong.

Reported-by: Andrei LUTAS <vlutas@bitdefender.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/mm.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/x86_emulate/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h