qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: peter.maydell@linaro.org
Cc: olaf@aepfle.de, xen-devel@lists.xensource.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-devel@nongnu.org, anthony@codemonkey.ws,
	Anthony.Perard@citrix.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PULL 1/7] exec: Limit translation limiting in address_space_translate to xen
Date: Wed, 7 May 2014 16:09:56 +0100	[thread overview]
Message-ID: <1399475403-5408-1-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1405071606230.14596@kaball.uk.xensource.com>

From: Alexey Kardashevskiy <aik@ozlabs.ru>

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>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 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.7.10.4

  reply	other threads:[~2014-05-07 15:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 15:09 [Qemu-devel] [PULL 0/7] xen-140507 Stefano Stabellini
2014-05-07 15:09 ` Stefano Stabellini [this message]
2014-05-07 15:12   ` [Qemu-devel] [PULL 1/7] exec: Limit translation limiting in address_space_translate to xen Peter Maydell
2014-05-07 15:22     ` Paolo Bonzini
2014-05-07 15:30       ` Stefano Stabellini
2014-05-07 15:32       ` Peter Maydell
2014-05-07 15:38         ` Paolo Bonzini
2014-05-07 15:09 ` [Qemu-devel] [PULL 2/7] qemu-xen: free all the pirqs for msi/msix when driver unload Stefano Stabellini
2014-05-07 15:09 ` [Qemu-devel] [PULL 3/7] xen: move Xen PV machine files to hw/xenpv Stefano Stabellini
2014-05-07 15:09 ` [Qemu-devel] [PULL 4/7] xen: move Xen HVM files under hw/i386/xen Stefano Stabellini
2014-05-07 15:10 ` [Qemu-devel] [PULL 5/7] xen: factor out common functions Stefano Stabellini
2014-05-07 15:10 ` [Qemu-devel] [PULL 6/7] pass an inclusive address range to xc_domain_pin_memory_cacheattr Stefano Stabellini
2014-05-07 15:10 ` [Qemu-devel] [PULL 7/7] xen_disk: add discard support Stefano Stabellini
2014-05-07 15:55 ` [Qemu-devel] [PULL 0/7] xen-140507 Peter Maydell
2014-05-07 16:19   ` Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2014-05-07 16:21 [Qemu-devel] [PULL 0/7] xen-140507-2 Stefano Stabellini
2014-05-07 16:21 ` [Qemu-devel] [PULL 1/7] exec: Limit translation limiting in address_space_translate to xen 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=1399475403-5408-1-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Anthony.Perard@citrix.com \
    --cc=aik@ozlabs.ru \
    --cc=anthony@codemonkey.ws \
    --cc=olaf@aepfle.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).