kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v6 0/3] plumb kvm/vfio to notify kvm:group attach/detach
@ 2016-11-18 11:01 Jike Song
  2016-11-18 11:01 ` [v6 1/3] vfio: vfio_register_notifier: classify iommu notifier Jike Song
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jike Song @ 2016-11-18 11:01 UTC (permalink / raw)
  To: alex.williamson, pbonzini, guangrong.xiao
  Cc: kwankhede, cjia, kevin.tian, jike.song, kvm

So far KVM and VFIO are mostly transparent to each other.
However, there are users who would rely on them both. For
example, KVMGT relies on VFIO to mediate device operations,
and it also relies on KVM for features such as guest page
tracking. To do that, it needs to know which KVM instance
a vfio_group is attached to, when it will be detached.

There is already a kvm_vfio device serving for similar
purpose, this series extends it to allow users register
notifiers on a vfio_group, and notify kvm:group attaching
and detaching events to that.


Changes v6:
	- only allow registration on already opened vfio_group 
	- moved WARN_ON from vfio_group_release to vfio_group_fops_release
	- remove unnecessary check
Changes v5:
	- separate vfio_group and vfio_iommu events from each other
	- force user to specifiy which type it is interested in, and which events.
	  Register it IFF all events are supported
Changes v4:
	- use a notifier-based implementation in vfio_group
	- combine the notifier along with iommu notifier by Kirti
Changes v3:
	- don't touch kvm_put_kvm, vfio won't need it
	- fix a race condition
Changes v2:
	- As Paolo suggested, drop the type and get/put ops from
	  vfio, assuming that the data will always be kvm.



Jike Song (3):
  vfio: vfio_register_notifier: classify iommu notifier
  vfio: support notifier chain in vfio_group
  kvm: set/clear kvm to/from vfio_group when group add/delete

 drivers/vfio/vfio.c  | 156 +++++++++++++++++++++++++++++++++++++++++++--------
 include/linux/vfio.h |  22 +++++++-
 virt/kvm/vfio.c      |  31 ++++++++++
 3 files changed, 184 insertions(+), 25 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2016-11-22  6:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-18 11:01 [v6 0/3] plumb kvm/vfio to notify kvm:group attach/detach Jike Song
2016-11-18 11:01 ` [v6 1/3] vfio: vfio_register_notifier: classify iommu notifier Jike Song
2016-11-18 17:55   ` Alex Williamson
2016-11-19  3:32     ` Jike Song
2016-11-18 11:01 ` [v6 2/3] vfio: support notifier chain in vfio_group Jike Song
2016-11-18 17:55   ` Alex Williamson
2016-11-19  4:14     ` Jike Song
2016-11-21 16:56       ` Alex Williamson
2016-11-22  6:21         ` Jike Song
2016-11-18 11:01 ` [v6 3/3] kvm: set/clear kvm to/from vfio_group when group add/delete Jike Song

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