Skip to contentSkip to conversation

x86: don't allow Dom0 to map MSI-X table writably

PATCH In review Jan Beulich 2 participants 2 messages Feb 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: don't allow Dom0 to map MSI-X table writably

With the traditional qemu tree fixed to not use PROT_WRITE anymore in the mmap() call for this region, and with the upstream qemu tree not being capable of handling passthrough, yet, there's no need to treat Dom specially here anymore.

This continues to leave unaddressed the case where PV guests map the MSI-X table page(s) before setting up the first MSI-X interrupt (see the original c/s 22182:68cc3c514a0a description for options).

xen/arch/x86/mm.c +1 -1
@@ -869,7 +869,7 @@ get_page_from_l1e(
             return -EINVAL;
         }
 
-        if ( !(l1f & _PAGE_RW) || IS_PRIV(pg_owner) ||
+        if ( !(l1f & _PAGE_RW) ||
              !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
             return 0;
         dprintk(XENLOG_G_WARNING,

x86: don't allow Dom0 to map MSI-X table writably

With the traditional qemu tree fixed to not use PROT_WRITE anymore in the mmap() call for this region, and with the upstream qemu tree not being capable of handling passthrough, yet, there's no need to treat Dom specially here anymore.

This continues to leave unaddressed the case where PV guests map the MSI-X table page(s) before setting up the first MSI-X interrupt (see the original c/s 22182:68cc3c514a0a description for options).

xen/arch/x86/mm.c +1 -1
@@ -869,7 +869,7 @@ get_page_from_l1e(
             return -EINVAL;
         }
 
-        if ( !(l1f & _PAGE_RW) || IS_PRIV(pg_owner) ||
+        if ( !(l1f & _PAGE_RW) ||
              !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
             return 0;
         dprintk(XENLOG_G_WARNING,

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Jan Beulich

With the traditional qemu tree fixed to not use PROT_WRITE anymore in the mmap() call for this region, and with the upstream qemu tree not being capable of handling passthrough, yet, there's no need to treat Dom specially here anymore.

This continues to leave unaddressed the case where PV guests map the MSI-X table page(s) before setting up the first MSI-X interrupt (see the original c/s 22182:68cc3c514a0a description for options).

Quoted 18 lines
xen/arch/x86/mm.c +1 -1
@@ -869,7 +869,7 @@ get_page_from_l1e(
             return -EINVAL;
         }
 
-        if ( !(l1f & _PAGE_RW) || IS_PRIV(pg_owner) ||
+        if ( !(l1f & _PAGE_RW) ||
              !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
             return 0;
         dprintk(XENLOG_G_WARNING,

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel