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

Re: [Xen-devel] [PATCH] arm: xen: foreign mapping PTEs are special.



On Wed, 4 Dec 2013, Ian Campbell wrote:
> These mappings are in fact special and require special handling in privcmd,
> which already exists. Failure to mark the PTE as special on arm64 causes all 
> sorts of bad PTE fun.
> 
> x86 already gets this correct.

Yes, but x86 does that for PV guests, not for autotranslate guests (for
which the function return -EINVAL).

Given that in the ARM case we are changing the p2m underneath, why do we
also need to mark them special?



> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
> ---
>  arch/arm/xen/enlighten.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> index 83e4f95..932cc50 100644
> --- a/arch/arm/xen/enlighten.c
> +++ b/arch/arm/xen/enlighten.c
> @@ -96,7 +96,7 @@ static int remap_pte_fn(pte_t *ptep, pgtable_t token, 
> unsigned long addr,
>       struct remap_data *info = data;
>       struct page *page = info->pages[info->index++];
>       unsigned long pfn = page_to_pfn(page);
> -     pte_t pte = pfn_pte(pfn, info->prot);
> +     pte_t pte = pte_mkspecial(pfn_pte(pfn, info->prot));
>  
>       if (map_foreign_page(pfn, info->fgmfn, info->domid))
>               return -EFAULT;
> -- 
> 1.7.10.4
> 

_______________________________________________
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®.