]> xenbits.xensource.com Git - xen.git/commitdiff
x86: don't allow Dom0 access to the MSI address range
authorJan Beulich <jbeulich@suse.com>
Mon, 9 Sep 2013 09:45:16 +0000 (11:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 9 Sep 2013 09:45:16 +0000 (11:45 +0200)
In particular, MMIO assignments should not be done using this area.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by Xiantao Zhang <xiantao.zhang@intel.com>
master commit: 850188e1278cecd1dfb9b936024bee2d8dfdcc18
master date: 2013-08-27 11:11:38 +0200

xen/arch/x86/domain_build.c

index 03fe845e4b12c1f3f1f5f2958e2c52fff2268c11..8365f327f43cd52cbf239821135125c256ec0642 100644 (file)
@@ -1122,6 +1122,10 @@ int __init construct_dom0(
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
             rc |= iomem_deny_access(dom0, mfn, mfn);
     }
+    /* MSI range. */
+    rc |= iomem_deny_access(dom0, paddr_to_pfn(MSI_ADDR_BASE_LO),
+                            paddr_to_pfn(MSI_ADDR_BASE_LO +
+                                         MSI_ADDR_DEST_ID_MASK));
 
     /* Remove access to E820_UNUSABLE I/O regions above 1MB. */
     for ( i = 0; i < e820.nr_map; i++ )