]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
x86/hvm: simplify emulation triggered by vm_event response
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Tue, 9 Feb 2016 12:20:49 +0000 (13:20 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 9 Feb 2016 12:20:49 +0000 (13:20 +0100)
commit6fb9fbf5e6c71716c7218ca0ac99cd756d68a3d2
treeb3ada8ede64e0c08ea3ab4480778acab5c3a2de6
parentd1d181328d29f183ffd7fcfe3aa88b2b03f6e6a9
x86/hvm: simplify emulation triggered by vm_event response

Currently, after receiving a vm_event reply requesting emulation,
the actual emulation is triggered in p2m_mem_access_check(),
which means that we're waiting for the page fault to occur again
before emulating. Aside from the performance impact, this
complicates the code since between hvm_do_resume() and the second
page fault it is possible that the latter becomes a completely
new page fault - hence checking that EIP and the GPA match with
the ones in the original page fault. If they don't, duplicate
EPT fault vm_events will occur, of which a monitoring application
needs to be aware.
This patch makes struct arch_vm_event smaller (since we no longer
need to track eip and gpa), removes the checking code from
p2m_mem_access_check(), and moves the emulation in hvm_do_resume().

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/vm_event.h