qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] exec: Limit translation limiting in address_spa


From: Michael Roth
Subject: Re: [Qemu-devel] [PATCH] exec: Limit translation limiting in address_space_translate to xen
Date: Mon, 14 Apr 2014 23:05:35 -0500
User-agent: alot/0.3.4

Quoting Alexey Kardashevskiy (2014-03-26 23:35:26)
> The address_space_translate() function cuts the returned plen (page size)
> to hardcoded TARGET_PAGE_SIZE. This function can be used on pages bigger
> than that so this limiting should not be used on such pages.
> 
> Since originally the limiting was introduced for XEN, we can safely
> limit this piece of code to XEN. So does the patch.
> 
> Suggested-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> ---
> 
> I need this change for VFIO-on-sPAPR series as it is going to support
> 16MB IOMMU pages. Thanks.

Cc'ing address@hidden since this reportedly fixes booting w64 off virtio-scsi

> ---
>  exec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/exec.c b/exec.c
> index 91513c6..cf12049 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -380,7 +380,7 @@ MemoryRegion *address_space_translate(AddressSpace *as, 
> hwaddr addr,
>          as = iotlb.target_as;
>      }
> 
> -    if (memory_access_is_direct(mr, is_write)) {
> +    if (xen_enabled() && memory_access_is_direct(mr, is_write)) {
>          hwaddr page = ((addr & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE) - addr;
>          len = MIN(page, len);
>      }
> -- 
> 1.8.4.rc4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]