WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xenalyze: Enumerate APIC_ACCESS vmexits as MMIO, s

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xenalyze: Enumerate APIC_ACCESS vmexits as MMIO, so they show up in --with-mmio-enumeration
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Mon, 22 Nov 2010 12:15:33 +0000
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Mon, 22 Nov 2010 04:16:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r 9b3c5bb22b50 -r 61d71976769e xenalyze.c
--- a/xenalyze.c        Mon Nov 22 11:41:15 2010 +0000
+++ b/xenalyze.c        Mon Nov 22 12:15:00 2010 +0000
@@ -4520,6 +4520,21 @@
     }
 }
 
+/* Also called by shadow_mmio_postprocess */
+void enumerate_mmio(struct hvm_data *h)
+{
+    struct pf_xen_extra *e = &h->inflight.pf_xen;
+
+    if ( e->mmio_data_valid )
+        update_io_address(&h->summary.mmio, e->gpa, e->mmio_is_write, 
h->arc_cycles, e->va);
+}
+
+void hvm_apic_access_postprocess(struct hvm_data *h)
+{
+    if ( opt.with_mmio_enumeration )
+        enumerate_mmio(h);
+}
+
 void hvm_npf_process(struct record_info *ri, struct hvm_data *h)
 {
     struct {
@@ -5016,12 +5031,21 @@
     h->wrmap_bf = 0;
     h->short_summary_done = 0;
 
-    if(!opt.svm_mode && h->exit_reason == EXIT_REASON_EXCEPTION_NMI)
-    {
-        bzero(&h->inflight.pf_xen, sizeof(h->inflight.pf_xen));
-        h->post_process = hvm_exception_nmi_generic_postprocess;
-    } else {
-        h->post_process = NULL;
+    h->post_process = NULL;
+    if(!opt.svm_mode)
+    {
+        switch(h->exit_reason)
+        {
+        case EXIT_REASON_EXCEPTION_NMI:
+            bzero(&h->inflight.pf_xen, sizeof(h->inflight.pf_xen));
+            h->post_process = hvm_exception_nmi_generic_postprocess;
+            break;
+        case EXIT_REASON_APIC_ACCESS:
+            bzero(&h->inflight.pf_xen, sizeof(h->inflight.pf_xen));
+            h->post_process = hvm_apic_access_postprocess;
+        default:
+            ;
+        }
     }
   
     {
@@ -5826,7 +5850,7 @@
     }
 
     if(opt.with_mmio_enumeration)
-        update_io_address(&h->summary.mmio, e->gpa, e->mmio_is_write, 
h->arc_cycles, e->va);
+        enumerate_mmio(h);
 
     if ( opt.dump_cooked )
     {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xenalyze: Enumerate APIC_ACCESS vmexits as MMIO, so they show up in --with-mmio-enumeration, George Dunlap <=