From 7167222b15dc661ff0b44cc93d558f6bb4ff6492 Mon Sep 17 00:00:00 2001 From: Tamas K Lengyel Date: Thu, 14 Jan 2016 10:49:50 +0100 Subject: [PATCH] vm_event: add altp2m info to HVM events as well Add altp2m information to HVM events as well when altp2m is active. Signed-off-by: Tamas K Lengyel Acked-by: Razvan Cojocaru Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/event.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c index 73c8f1430b..a3d489209f 100644 --- a/xen/arch/x86/hvm/event.c +++ b/xen/arch/x86/hvm/event.c @@ -22,6 +22,7 @@ #include #include #include +#include #include static void hvm_event_fill_regs(vm_event_request_t *req) @@ -83,6 +84,12 @@ static int hvm_event_traps(uint8_t sync, vm_event_request_t *req) vm_event_vcpu_pause(curr); } + if ( altp2m_active(currd) ) + { + req->flags |= VM_EVENT_FLAG_ALTERNATE_P2M; + req->altp2m_idx = vcpu_altp2m(curr).p2midx; + } + hvm_event_fill_regs(req); vm_event_put_request(currd, &currd->vm_event->monitor, req); -- 2.30.2