All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-devel@nongnu.org,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [PATCH] exec: Limit translation limiting in address_space_translate to xen
Date: Thu, 27 Mar 2014 13:15:45 +0100	[thread overview]
Message-ID: <53341671.40404@redhat.com> (raw)
In-Reply-To: <1395894926-16633-1-git-send-email-aik@ozlabs.ru>

Il 27/03/2014 05:35, Alexey Kardashevskiy ha scritto:
> 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 <pbonzini@redhat.com>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>
> I need this change for VFIO-on-sPAPR series as it is going to support
> 16MB IOMMU pages. Thanks.
> ---
>  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);
>      }
>

Stefano, can you include this in your Xen tree for 2.1?

Paolo

  reply	other threads:[~2014-03-27 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27  4:35 [Qemu-devel] [PATCH] exec: Limit translation limiting in address_space_translate to xen Alexey Kardashevskiy
2014-03-27 12:15 ` Paolo Bonzini [this message]
2014-03-27 12:17   ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53341671.40404@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=aik@ozlabs.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.