From: Peter Xu <peterx@redhat.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: mst@redhat.com, qemu-devel@nongnu.org, eric.auger@redhat.com,
alex.williamson@redhat.com, pbonzini@redhat.com,
bbhushan2@marvell.com
Subject: Re: [PATCH v11 09/10] virtio-iommu: Set supported page size mask
Date: Tue, 3 Nov 2020 11:44:38 -0500 [thread overview]
Message-ID: <20201103164438.GI20600@xz-x1> (raw)
In-Reply-To: <20201103163234.GB6723@myrica>
On Tue, Nov 03, 2020 at 05:32:34PM +0100, Jean-Philippe Brucker wrote:
> > In summary:
> >
> > if (qdev_hotplug) {
> > if ((new_mask & cur_mask) == cur_mask) {
> > /* Superset of old mask; we're good. Keep the old mask since same */
> > return 0;
>
> That looks correct, but a bit too restrictive. If we start with
> cur_mask = 0xfffffffffffff000, and we hotplug a VFIO device with
> new_mask = 0x40201000 (4k page, 2M 1G blocks), then this code rejects it
> even though it would work.
Yeah I think you're right - it should be the smallest granule that matters the
most. Thanks,
--
Peter Xu
next prev parent reply other threads:[~2020-11-03 16:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 18:05 [PATCH v11 00/10] virtio-iommu: VFIO integration Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 01/10] virtio-iommu: Fix virtio_iommu_mr() Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 02/10] virtio-iommu: Store memory region in endpoint struct Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 03/10] virtio-iommu: Add memory notifiers for map/unmap Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 04/10] virtio-iommu: Call memory notifiers in attach/detach Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 05/10] virtio-iommu: Add replay() memory region callback Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 06/10] virtio-iommu: Add notify_flag_changed() " Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 07/10] memory: Add interface to set iommu page size mask Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 08/10] vfio: Set IOMMU page size as per host supported page size Jean-Philippe Brucker
2020-10-30 18:05 ` [PATCH v11 09/10] virtio-iommu: Set supported page size mask Jean-Philippe Brucker
2020-11-02 22:47 ` Peter Xu
2020-11-03 16:32 ` Jean-Philippe Brucker
2020-11-03 16:44 ` Peter Xu [this message]
2020-10-30 18:05 ` [PATCH v11 10/10] vfio: Don't issue full 2^64 unmap Jean-Philippe Brucker
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=20201103164438.GI20600@xz-x1 \
--to=peterx@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=bbhushan2@marvell.com \
--cc=eric.auger@redhat.com \
--cc=jean-philippe@linaro.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--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 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).