[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/HVM: drop bogus #PF raising from linear->phys translation
>>> On 07.09.17 at 12:17, <andrew.cooper3@xxxxxxxxxx> wrote: > On 07/09/17 09:14, Jan Beulich wrote: >> --- a/xen/arch/x86/hvm/emulate.c >> +++ b/xen/arch/x86/hvm/emulate.c >> @@ -566,15 +566,12 @@ static int hvmemul_linear_to_phys( >> if ( pfec & (PFEC_page_paged | PFEC_page_shared) ) >> return X86EMUL_RETRY; >> done /= bytes_per_rep; >> - *reps = done; >> if ( done == 0 ) >> { >> ASSERT(!reverse); >> - if ( npfn != gfn_x(INVALID_GFN) ) >> - return X86EMUL_UNHANDLEABLE; >> - x86_emul_pagefault(pfec, addr & PAGE_MASK, >> &hvmemul_ctxt->ctxt); >> - return X86EMUL_EXCEPTION; >> + return X86EMUL_UNHANDLEABLE; > > I dont follow your reasoning. The pagefault path is only reachable when > npfn is INVALID_GFN, which means a pagewalk did fail. Hmm, good point. Yet the code as is definitely is not correct, as it causes the guest to triple-fault with the hvmloader test changes just sent. But since what you say regarding the #PF is true, it looks like it's really just the "*reps = done" placement which is causing the bad behavior; let me try with just that one moved to the proper place(s). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |