[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] nestedhvm: fix write access fault on ro mapping



At 16:15 +0200 on 19 Jul (1342714507), Christoph Egger wrote:
> 
> Fix write access fault when host npt is mapped read-only.
> In this case let the host handle the #NPF.
> Apply host p2mt to hap-on-hap pagetable entry.
> This fixes the l2 guest graphic display refresh problem.

> diff -r ae0e96e156f3 xen/arch/x86/hvm/hvm.c
> --- a/xen/arch/x86/hvm/hvm.c  Thu Jul 19 12:12:12 2012 +0200
> +++ b/xen/arch/x86/hvm/hvm.c  Thu Jul 19 15:30:04 2012 +0200
> @@ -1291,6 +1291,8 @@ int hvm_hap_nested_page_fault(unsigned l
>              if ( !handle_mmio() )
>                  hvm_inject_hw_exception(TRAP_gp_fault, 0);
>              return 1;
> +        case NESTEDHVM_PAGEFAULT_READONLY:
> +            break;

Don't we have to translate the faulting PA into an L1 address before
letting the rest of this fault handler run?  It explicitly operates on
the hostp2m.  

If we do that, we should probably do it for NESTEDHVM_PAGEFAULT_ERROR,
rather than special-casing READONLY.  That way any other
automatically-fixed types (like the p2m_access magic) will be covered
too.

Cheers,

Tim.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.