qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: cjia@nvidia.com, kvm@vger.kernel.org, aik@ozlabs.ru,
	Zhengxiao.zx@alibaba-inc.com, shuangtai.tst@alibaba-inc.com,
	qemu-devel@nongnu.org, Kirti Wankhede <kwankhede@nvidia.com>,
	eauger@redhat.com, yi.l.liu@intel.com, eskultet@redhat.com,
	ziye.yang@intel.com, mlevitsk@redhat.com, pasic@linux.ibm.com,
	felipe@nutanix.com, Ken.Xue@amd.com, kevin.tian@intel.com,
	yan.y.zhao@intel.com, dgilbert@redhat.com,
	changpeng.liu@intel.com, cohuck@redhat.com, zhi.a.wang@intel.com,
	jonathan.davies@nutanix.com
Subject: Re: [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices
Date: Tue, 29 Sep 2020 13:52:30 -0600	[thread overview]
Message-ID: <20200929135230.6cfb24aa@x1.home> (raw)
In-Reply-To: <20200929082702.GA181243@stefanha-x1.localdomain>

On Tue, 29 Sep 2020 09:27:02 +0100
Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Fri, May 29, 2020 at 02:00:46AM +0530, Kirti Wankhede wrote:
> > * IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with
> >   respect to IOMMU container rather than per device. All pages pinned by
> >   vendor driver through vfio_pin_pages external API has to be marked as
> >   dirty during  migration. When IOMMU capable device is present in the
> >   container and all pages are pinned and mapped, then all pages are marked
> >   dirty.  
> 
> From what I can tell only the iommu participates in dirty page tracking.
> This places the responsibility for dirty page tracking on IOMMUs. My
> understanding is that support for dirty page tracking is currently not
> available in IOMMUs.
> 
> Can a PCI device implement its own DMA dirty log and let an mdev driver
> implement the dirty page tracking using this mechanism? That way we
> don't need to treat all pinned pages as dirty all the time.

Look at the last patch in this series, there we define a mechanism
whereby the act of a vendor driver pinning pages both marks those pages
dirty and indicates a mode in the vfio type1 container where the scope
of dirty pages is limited to those pages pinned by the driver.  The
vfio_dma_rw() interface does the same.  We could clearly implement a
more lightweight interface for this as well, one without pinning or
memory access, but there are no proposed users for such an interface
currently.  Thanks,

Alex



      reply	other threads:[~2020-09-29 20:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 20:30 [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 1/8] vfio: UAPI for migration interface for device state Kirti Wankhede
2020-09-28 16:51   ` Stefan Hajnoczi
2020-05-28 20:30 ` [PATCH Kernel v24 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 4/8] vfio iommu: Add ioctl definition for dirty pages tracking Kirti Wankhede
2020-09-28 17:06   ` Stefan Hajnoczi
2020-05-28 20:30 ` [PATCH Kernel v24 5/8] vfio iommu: Implementation of ioctl " Kirti Wankhede
2020-06-02 15:51   ` Kirti Wankhede
2020-06-02 16:44     ` Alex Williamson
2020-05-28 20:30 ` [PATCH Kernel v24 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 7/8] vfio iommu: Add migration capability to report supported features Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages Kirti Wankhede
2020-05-29 21:09 ` [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices Alex Williamson
2020-07-21  2:43 ` Xiang Zheng
2020-07-21 22:43   ` Alex Williamson
2020-07-22  2:55     ` Xiang Zheng
2020-07-22  3:24       ` Tian, Kevin
2020-09-29  8:27 ` Stefan Hajnoczi
2020-09-29 19:52   ` Alex Williamson [this message]

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=20200929135230.6cfb24aa@x1.home \
    --to=alex.williamson@redhat.com \
    --cc=Ken.Xue@amd.com \
    --cc=Zhengxiao.zx@alibaba-inc.com \
    --cc=aik@ozlabs.ru \
    --cc=changpeng.liu@intel.com \
    --cc=cjia@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eauger@redhat.com \
    --cc=eskultet@redhat.com \
    --cc=felipe@nutanix.com \
    --cc=jonathan.davies@nutanix.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=mlevitsk@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shuangtai.tst@alibaba-inc.com \
    --cc=stefanha@gmail.com \
    --cc=yan.y.zhao@intel.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhi.a.wang@intel.com \
    --cc=ziye.yang@intel.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).