]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
vm_event: add altp2m info to HVM events as well
authorTamas K Lengyel <tamas@tklengyel.com>
Thu, 14 Jan 2016 09:49:50 +0000 (10:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 14 Jan 2016 09:49:50 +0000 (10:49 +0100)
Add altp2m information to HVM events as well when altp2m is active.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/event.c

index 73c8f1430bc77d98ab1f84a31cc5ec430d70ae9f..a3d489209fef1a4ac2d2770b0d2fe3617b4c0a0e 100644 (file)
@@ -22,6 +22,7 @@
 #include <xen/paging.h>
 #include <asm/hvm/event.h>
 #include <asm/monitor.h>
+#include <asm/altp2m.h>
 #include <public/vm_event.h>
 
 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);