From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Olaf Hering <olaf@aepfle.de>,
"xen-devel@lists.xensource.com Devel"
<xen-devel@lists.xensource.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>,
Anthony PERARD <Anthony.Perard@citrix.com>
Subject: Re: [Qemu-devel] [PULL 1/7] exec: Limit translation limiting in address_space_translate to xen
Date: Wed, 07 May 2014 17:22:35 +0200 [thread overview]
Message-ID: <536A4FBB.50105@redhat.com> (raw)
In-Reply-To: <CAFEAcA-pXxyUeh14xC04SqxYLDDVvM40m8_zqV7Nx0DDjC498A@mail.gmail.com>
Il 07/05/2014 17:12, Peter Maydell ha scritto:
>> > - 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);
>> > }
> We should put this patch in (both as an efficiency thing and an
> expedient fix) but we really need to either track down which
> callers of this API are relying on the returned plen not being
> truncated, or we need to fix Xen to not truncate either. This
> is just a bandaid IMHO.
Fixing Xen to not truncate is not possible because of the Xen mapcache,
unless of course QEMU is changed to avoid the mapcache completely on
64-bit hosts. I'm not sure if that makes sense from the Xen point of view.
Regarding fixing callers, a known one is virtio-scsi which is a bug and
on my todo list. But another is VFIO, which cannot accept truncation if
the IOMMU page size is greater than TARGET_PAGE_SIZE.
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Olaf Hering <olaf@aepfle.de>,
"xen-devel@lists.xensource.com Devel"
<xen-devel@lists.xensource.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>,
Anthony PERARD <Anthony.Perard@citrix.com>
Subject: Re: [PULL 1/7] exec: Limit translation limiting in address_space_translate to xen
Date: Wed, 07 May 2014 17:22:35 +0200 [thread overview]
Message-ID: <536A4FBB.50105@redhat.com> (raw)
In-Reply-To: <CAFEAcA-pXxyUeh14xC04SqxYLDDVvM40m8_zqV7Nx0DDjC498A@mail.gmail.com>
Il 07/05/2014 17:12, Peter Maydell ha scritto:
>> > - 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);
>> > }
> We should put this patch in (both as an efficiency thing and an
> expedient fix) but we really need to either track down which
> callers of this API are relying on the returned plen not being
> truncated, or we need to fix Xen to not truncate either. This
> is just a bandaid IMHO.
Fixing Xen to not truncate is not possible because of the Xen mapcache,
unless of course QEMU is changed to avoid the mapcache completely on
64-bit hosts. I'm not sure if that makes sense from the Xen point of view.
Regarding fixing callers, a known one is virtio-scsi which is a bug and
on my todo list. But another is VFIO, which cannot accept truncation if
the IOMMU page size is greater than TARGET_PAGE_SIZE.
Paolo
next prev parent reply other threads:[~2014-05-07 15:23 UTC|newest]
Thread overview: 31+ 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
2014-05-07 15:09 ` [Qemu-devel] [PULL 1/7] exec: Limit translation limiting in address_space_translate to xen Stefano Stabellini
2014-05-07 15:09 ` Stefano Stabellini
2014-05-07 15:12 ` [Qemu-devel] " Peter Maydell
2014-05-07 15:12 ` Peter Maydell
2014-05-07 15:22 ` Paolo Bonzini [this message]
2014-05-07 15:22 ` Paolo Bonzini
2014-05-07 15:30 ` [Qemu-devel] " Stefano Stabellini
2014-05-07 15:30 ` Stefano Stabellini
2014-05-07 15:32 ` [Qemu-devel] " Peter Maydell
2014-05-07 15:32 ` Peter Maydell
2014-05-07 15:38 ` [Qemu-devel] " Paolo Bonzini
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 ` 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 ` 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:09 ` Stefano Stabellini
2014-05-07 15:10 ` [Qemu-devel] [PULL 5/7] xen: factor out common functions Stefano Stabellini
2014-05-07 15:10 ` 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 ` Stefano Stabellini
2014-05-07 15:10 ` [Qemu-devel] [PULL 7/7] xen_disk: add discard support Stefano Stabellini
2014-05-07 15:10 ` Stefano Stabellini
2014-05-07 15:55 ` [Qemu-devel] [PULL 0/7] xen-140507 Peter Maydell
2014-05-07 15:55 ` Peter Maydell
2014-05-07 16:19 ` [Qemu-devel] " Stefano Stabellini
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=536A4FBB.50105@redhat.com \
--to=pbonzini@redhat.com \
--cc=Anthony.Perard@citrix.com \
--cc=aik@ozlabs.ru \
--cc=anthony@codemonkey.ws \
--cc=olaf@aepfle.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--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 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.