From: Alex Williamson <alex.williamson@redhat.com>
To: "Aviv B.D." <bd.aviv@gmail.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Peter Xu <peterx@redhat.com>, Jan Kiszka <jan.kiszka@siemens.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications
Date: Thu, 20 Oct 2016 14:06:08 -0600 [thread overview]
Message-ID: <20161020140608.0f373ea9@t450s.home> (raw)
In-Reply-To: <CAM3WwMgiFni0KfuQVbzjXvcDGBk-C2G8PRYtnnpE+-E7zkn43Q@mail.gmail.com>
[cc +david]
On Thu, 20 Oct 2016 22:17:18 +0300
"Aviv B.D." <bd.aviv@gmail.com> wrote:
> On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson <alex.williamson@redhat.com
> > wrote:
>
> > On Mon, 17 Oct 2016 18:44:21 +0300
> > "Aviv B.D" <bd.aviv@gmail.com> wrote:
> >
> > > From: "Aviv Ben-David" <bd.aviv@gmail.com>
> > >
> > > * Advertize Cache Mode capability in iommu cap register.
> > > This capability is controlled by "cache-mode" property of intel-iommu
> > device.
> > > To enable this option call QEMU with "-device
> > intel-iommu,cache-mode=true".
> > >
> > > * On page cache invalidation in intel vIOMMU, check if the domain belong
> > to
> > > registered notifier, and notify accordingly.
> > >
> > > Currently this patch still doesn't enabling VFIO devices support with
> > vIOMMU
> > > present. Current problems:
> > > * vfio_iommu_map_notify is not aware about memory range belong to
> > specific
> > > VFIOGuestIOMMU.
> >
> > Could you elaborate on why this is an issue?
> >
>
> In my setup the VFIO registered two memory areas with one page of
> unregistered memory
> between them.
>
> When I'm calling memory_region_notify_iommu it calls the notifier function
> of VFIO twice
> when the second time is failing with warning to console as the new mapping
> is already present.
>
> The notifier function of VFIO should ignore IOMMUTLBEntry that is not in
> the correct
> range.
Hmm, right vfio_listener_region_add() is called for a
MemoryRegionSection, but then we add an iommu notifier to the
MemoryRegion, so we end up with a notifier per MemoryRegionSection
regardless of whether they're backed by the same MemoryRegion. Seems
like we need a MemoryRegion based list of VFIOGuestIOMMUs so we only
register once per MemoryRegion and then sort though the list of
VFIOGuestIOMMUs for a given MemoryRegion to find the one affected.
David, does that sound right to you?
I am curious why you get two regions separated by one page, can you
give an example of the ranges for each? Thanks,
Alex
next prev parent reply other threads:[~2016-10-20 20:06 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 15:44 [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications Aviv B.D
2016-10-17 15:44 ` [Qemu-devel] [PATCH v4 RESEND 1/3] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest Aviv B.D
2016-10-21 7:14 ` Jason Wang
2016-10-21 19:47 ` Michael S. Tsirkin
2016-10-24 2:32 ` Jason Wang
2016-10-17 15:44 ` [Qemu-devel] [PATCH v4 RESEND 2/3] IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode Aviv B.D
2016-10-18 3:57 ` David Gibson
2016-10-19 8:35 ` Peter Xu
2016-10-20 18:54 ` Aviv B.D.
2016-10-17 15:44 ` [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers Aviv B.D
2016-10-18 4:04 ` David Gibson
2016-10-19 9:33 ` Peter Xu
2016-10-20 19:11 ` Aviv B.D.
2016-10-20 19:11 ` Aviv B.D.
2016-10-21 3:57 ` Peter Xu
2016-10-24 7:53 ` Aviv B.D.
2016-10-24 8:02 ` Peter Xu
2016-10-25 10:07 ` Aviv B.D.
2016-10-20 7:28 ` Peter Xu
2016-10-17 16:07 ` [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications Alex Williamson
2016-10-18 4:06 ` David Gibson
2016-10-18 4:47 ` Alex Williamson
2016-10-18 5:52 ` David Gibson
2016-10-18 8:03 ` Alex Williamson
2016-10-20 19:17 ` Aviv B.D.
2016-10-20 20:06 ` Alex Williamson [this message]
2016-10-21 0:50 ` David Gibson
2016-10-21 5:17 ` Peter Xu
2016-10-21 14:43 ` Alex Williamson
2016-10-31 6:47 ` Peter Xu
2016-10-24 6:03 ` David Gibson
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=20161020140608.0f373ea9@t450s.home \
--to=alex.williamson@redhat.com \
--cc=bd.aviv@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=jan.kiszka@siemens.com \
--cc=mst@redhat.com \
--cc=peterx@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 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.