kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] use vfio_iova_rw() to read/write IOVAs from CPU side
@ 2020-01-03  1:00 Yan Zhao
  2020-01-03  1:02 ` [PATCH 1/2] vfio: introduce vfio_iova_rw to read/write a range of IOVAs Yan Zhao
  2020-01-03  1:03 ` [PATCH 2/2] drm/i915/gvt: subsitute kvm_read/write_guest with vfio_iova_rw Yan Zhao
  0 siblings, 2 replies; 6+ messages in thread
From: Yan Zhao @ 2020-01-03  1:00 UTC (permalink / raw)
  To: alex.williamson, zhenyuw
  Cc: kvm, linux-kernel, intel-gvt, pbonzini, kevin.tian, Yan Zhao

When device models read/write memory pointed by a range of IOVAs, it is
better to use vfio interfaces. And because this read/write is from CPUs,
there's no need to call vfio_pin_pages() to pin those memory.

patch 1 introduces interface vfio_iova_rw() in vfio to read/write
userspace IOVAs without pinning userspace pages.

patch 2 let gvt switch from kvm side rw interface to vfio_iova_rw().


Yan Zhao (2):
  vfio: introduce vfio_iova_rw to read/write a range of IOVAs
  drm/i915/gvt: subsitute kvm_read/write_guest with vfio_iova_rw

 drivers/gpu/drm/i915/gvt/kvmgt.c | 26 +++-------
 drivers/vfio/vfio.c              | 45 ++++++++++++++++++
 drivers/vfio/vfio_iommu_type1.c  | 81 ++++++++++++++++++++++++++++++++
 include/linux/vfio.h             |  5 ++
 4 files changed, 138 insertions(+), 19 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-10  3:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03  1:00 [PATCH 0/2] use vfio_iova_rw() to read/write IOVAs from CPU side Yan Zhao
2020-01-03  1:02 ` [PATCH 1/2] vfio: introduce vfio_iova_rw to read/write a range of IOVAs Yan Zhao
2020-01-09 18:16   ` Alex Williamson
2020-01-10  3:24     ` Yan Zhao
2020-01-03  1:03 ` [PATCH 2/2] drm/i915/gvt: subsitute kvm_read/write_guest with vfio_iova_rw Yan Zhao
2020-01-07 10:21   ` Paolo Bonzini

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).