> -----Original Message-----
> From: Jan Beulich [mailto:[email protected]]
> Sent: 07 September 2017 09:14
> To: xen-devel <[email protected]>
> Cc: Andrew Cooper <[email protected]>; Paul Durrant
> <[email protected]>
> Subject: [PATCH] x86/HVM: drop bogus #PF raising from linear->phys
> translation
> 
> Translations spanning a page boundary not resulting in physically
> contiguous addresses is not a reason to raise #PF. In fact by not doing
> so accesses of this kind are being emulated correctly thanks to the
> fallback logic in the insn emulator's REP MOVS/STOS/INS/OUTS handling
> (non-string accesses to such locations are being split elsewhere and
> hence have been working fine already).

Yes, it does seem like this is way too low a layer to be raising this exception.

> 
> Signed-off-by: Jan Beulich <[email protected]>
> 

Reviewed-by: Paul Durrant <[email protected]>

> --- 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;
>              }
> +            *reps = done;
>              break;
>          }
> 
> 
> 


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

Reply via email to