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

Re: [Xen-devel] [PATCH 1/2] xen/mm: return more precise error from xen_remap_domain_range()



On Aug 30, 2012, at 8:58 AM, David Vrabel wrote:

> From: David Vrabel <david.vrabel@xxxxxxxxxx>
> 
> Callers of xen_remap_domain_range() need to know if the remap failed
> because frame is currently paged out.  So they can retry the remap
> later on.  Return -ENOENT in this case.
> 
> This assumes that the error codes returned by Xen are a subset of
> those used by the kernel.  It is unclear if this is defined as part of
> the hypercall ABI.
> 
> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Acked-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

Thanks,
Andres
> ---
> arch/x86/xen/mmu.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index b65a761..fb187ea 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -2355,8 +2355,8 @@ int xen_remap_domain_mfn_range(struct vm_area_struct 
> *vma,
>               if (err)
>                       goto out;
> 
> -             err = -EFAULT;
> -             if (HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid) < 0)
> +             err = HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid);
> +             if (err < 0)
>                       goto out;
> 
>               nr -= batch;
> -- 
> 1.7.2.5
> 


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