qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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>
Subject: Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications
Date: Mon, 17 Oct 2016 10:07:36 -0600	[thread overview]
Message-ID: <20161017100736.68a56fd9@t450s.home> (raw)
In-Reply-To: <1476719064-9242-1-git-send-email-bd.aviv@gmail.com>

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?

> * memory_region_iommu_replay hangs QEMU on start up while it itterate over 
>   64bit address space. Commenting out the call to this function enables 
>   workable VFIO device while vIOMMU present.

This has been discussed previously, it would be incorrect for vfio not
to call the replay function.  The solution is to add an iommu driver
callback to efficiently walk the mappings within a MemoryRegion.
Thanks,

Alex

> Changes from v1 to v2:
> * remove assumption that the cache do not clears
> * fix lockup on high load.
> 
> Changes from v2 to v3:
> * remove debug leftovers
> * split to sepearate commits
> * change is_write to flags in vtd_do_iommu_translate, add IOMMU_NO_FAIL 
>   to suppress error propagating to guest.
> 
> Changes from v3 to v4:
> * Add property to intel_iommu device to control the CM capability, 
>   default to False.
> * Use s->iommu_ops.notify_flag_changed to register notifiers.
> 
> Changes from v4 to v4 RESEND:
> * Fix codding style pointed by checkpatch.pl script.
> 
> Aviv Ben-David (3):
>   IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to
>     guest
>   IOMMU: change iommu_op->translate's is_write to flags, add support to
>     NO_FAIL flag mode
>   IOMMU: enable intel_iommu map and unmap notifiers
> 
>  exec.c                         |   3 +-
>  hw/i386/amd_iommu.c            |   4 +-
>  hw/i386/intel_iommu.c          | 175 +++++++++++++++++++++++++++++++++--------
>  hw/i386/intel_iommu_internal.h |   3 +
>  include/exec/memory.h          |   6 +-
>  include/hw/i386/intel_iommu.h  |  11 +++
>  memory.c                       |   3 +-
>  7 files changed, 168 insertions(+), 37 deletions(-)
> 

  parent reply	other threads:[~2016-10-17 16:07 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 ` Alex Williamson [this message]
2016-10-18  4:06   ` [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications 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
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=20161017100736.68a56fd9@t450s.home \
    --to=alex.williamson@redhat.com \
    --cc=bd.aviv@gmail.com \
    --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 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).