Skip to contentSkip to conversation

x86: mmio_ro_do_page_fault() must be unreachable for DomU

PATCH In review Jan Beulich 2 participants 5 messages Sep 28, 2017 – Oct 4, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: mmio_ro_do_page_fault() must be unreachable for DomU

When combining PTWR and MMIO-R/O PV page fault handlers, the need for a second hwdom check was overlooked.

xen/arch/x86/pv/ro-page-fault.c +2 -1
@@ -346,7 +346,8 @@ int pv_ro_page_fault(unsigned long addr, struct
     if ( ((l1e_get_flags(pte) & (_PAGE_PRESENT | _PAGE_RW)) != _PAGE_PRESENT) )
         return 0;
 
-    mmio_ro = rangeset_contains_singleton(mmio_ro_ranges, l1e_get_pfn(pte));
+    mmio_ro = is_hardware_domain(currd) &&
+              rangeset_contains_singleton(mmio_ro_ranges, l1e_get_pfn(pte));
     if ( mmio_ro )
         rc = mmio_ro_do_page_fault(&ctxt, addr, pte);
     else

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 28.09.17 at 17:17, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich

When combining PTWR and MMIO-R/O PV page fault handlers, the need for a second hwdom check was overlooked.

This should not have gone in without an ack from Andrew.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 10 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 28.09.17 at 17:17, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich

When combining PTWR and MMIO-R/O PV page fault handlers, the need for a second hwdom check was overlooked.

This should not have gone in without an ack from Andrew.

He said on IRC this patch should be committed.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 04.10.17 at 13:27, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 28.09.17 at 17:17, <[email protected]> wrote:
Quoted 3 lines · Jan Beulich

When combining PTWR and MMIO-R/O PV page fault handlers, the need for a second hwdom check was overlooked.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

This should not have gone in without an ack from Andrew.

He said on IRC this patch should be committed.

Ah, I see - that's not visible from the commit, though.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel