[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path
PV guests necessarily can't be external, as Xen must steal address space from them. Pagefaults for HVM guests are handled by {vmx,svm}_vmexit_handler() and don't enter the PV fixup_page_fault() path. This paging_fault() callsite is therefore dead code, so drop it. Clarify the comment at the other paging_fault() callsite to indicate that it covers the logdirty case only. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Tim Deegan <tim@xxxxxxx> CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx> --- xen/arch/x86/traps.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 013e633..b20faa4 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1799,15 +1799,6 @@ static int fixup_page_fault(unsigned long addr, struct cpu_user_regs *regs) if ( in_irq() || !(regs->eflags & X86_EFLAGS_IF) ) return 0; - /* Faults from external-mode guests are handled by shadow/hap */ - if ( paging_mode_external(d) && guest_mode(regs) ) - { - int ret = paging_fault(addr, regs); - if ( ret == EXCRET_fault_fixed ) - trace_trap_two_addr(TRC_PV_PAGING_FIXUP, regs->eip, addr); - return ret; - } - if ( !(regs->error_code & PFEC_page_present) && (pagefault_by_memadd(addr, regs)) ) return handle_memadd_fault(addr, regs); @@ -1838,8 +1829,11 @@ static int fixup_page_fault(unsigned long addr, struct cpu_user_regs *regs) return EXCRET_fault_fixed; } - /* For non-external shadowed guests, we fix up both their own - * pagefaults and Xen's, since they share the pagetables. */ + /* + * For non-external shadowed guests (i.e. PV guests with logdirty + * active), we fix up both their own pagefaults and Xen's, since + * they share the pagetables. + */ if ( paging_mode_enabled(d) && !paging_mode_external(d) ) { int ret = paging_fault(addr, regs); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |