[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] amd iommu: dump flags of IO page faults


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 11 Sep 2012 03:33:10 +0000
  • Delivery-date: Tue, 11 Sep 2012 03:33:21 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Wei Wang <wei.wang2@xxxxxxx>
# Date 1347020600 -7200
# Node ID 10e14cc12e2300ee1c4cdb081c8762cbe1311944
# Parent  7544f1804f45c699d5f1bc61151f489f76578be1
amd iommu: dump flags of IO page faults

Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 7544f1804f45 -r 10e14cc12e23 xen/drivers/passthrough/amd/iommu_init.c
--- a/xen/drivers/passthrough/amd/iommu_init.c  Fri Sep 07 12:55:26 2012 +0100
+++ b/xen/drivers/passthrough/amd/iommu_init.c  Fri Sep 07 14:23:20 2012 +0200
@@ -564,7 +564,7 @@ static hw_irq_controller iommu_msi_type 
 
 static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
 {
-    u16 domain_id, device_id, bdf, cword;
+    u16 domain_id, device_id, bdf, cword, flags;
     u32 code;
     u64 *addr;
     int count = 0;
@@ -609,11 +609,14 @@ static void parse_event_log_entry(struct
         domain_id = get_field_from_reg_u32(entry[1],
                                            IOMMU_EVENT_DOMAIN_ID_MASK,
                                            IOMMU_EVENT_DOMAIN_ID_SHIFT);
+        flags = get_field_from_reg_u32(entry[1],
+                                       IOMMU_EVENT_FLAGS_MASK,
+                                       IOMMU_EVENT_FLAGS_SHIFT);
         addr= (u64*) (entry + 2);
         printk(XENLOG_ERR "AMD-Vi: "
                "%s: domain = %d, device id = 0x%04x, "
-               "fault address = 0x%"PRIx64"\n",
-               event_str[code-1], domain_id, device_id, *addr);
+               "fault address = 0x%"PRIx64", flags = 0x%03x\n",
+               event_str[code-1], domain_id, device_id, *addr, flags);
 
         /* Tell the device to stop DMAing; we can't rely on the guest to
          * control it for us. */
diff -r 7544f1804f45 -r 10e14cc12e23 
xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h      Fri Sep 07 12:55:26 
2012 +0100
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h      Fri Sep 07 14:23:20 
2012 +0200
@@ -283,6 +283,8 @@
 #define IOMMU_EVENT_DOMAIN_ID_SHIFT          0
 #define IOMMU_EVENT_DEVICE_ID_MASK           0x0000FFFF
 #define IOMMU_EVENT_DEVICE_ID_SHIFT          0
+#define IOMMU_EVENT_FLAGS_SHIFT              16
+#define IOMMU_EVENT_FLAGS_MASK               0x0FFF0000
 
 /* PPR Log */
 #define IOMMU_PPR_LOG_ENTRY_SIZE                        16

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.