All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jike Song <jike.song@intel.com>
To: alex.williamson@redhat.com, pbonzini@redhat.com,
	guangrong.xiao@linux.intel.com
Cc: kwankhede@nvidia.com, cjia@nvidia.com, kevin.tian@intel.com,
	kvm@vger.kernel.org, jike.song@intel.com
Subject: [v4 0/3] plumb kvm/vfio to notify kvm:group attaching/detaching
Date: Tue, 15 Nov 2016 19:35:44 +0800	[thread overview]
Message-ID: <1479209747-5564-1-git-send-email-jike.song@intel.com> (raw)

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.


Based on Kirti:

	http://marc.info/?l=kvm&m=147913808504902


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: add vfio_group_notify support
  vfio_register_notifier: also register on the group notifier
  kvm: notify vfio on attaching and detaching

 drivers/vfio/vfio.c  | 34 ++++++++++++++++++++++++++++++++++
 include/linux/vfio.h |  4 ++++
 virt/kvm/vfio.c      | 31 +++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+)

-- 
1.9.1


             reply	other threads:[~2016-11-15 11:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 11:35 Jike Song [this message]
2016-11-15 11:35 ` [v4 1/3] vfio: add vfio_group_notify support Jike Song
2016-11-15 23:11   ` Alex Williamson
2016-11-16  3:02     ` Jike Song
2016-11-15 11:35 ` [v4 2/3] vfio_register_notifier: also register on the group notifier Jike Song
2016-11-15 23:11   ` Alex Williamson
2016-11-16  3:01     ` Jike Song
2016-11-16  3:43       ` Alex Williamson
2016-11-16  9:14         ` Kirti Wankhede
2016-11-16  9:37           ` Jike Song
2016-11-16 10:44             ` Kirti Wankhede
2016-11-16 17:48               ` Alex Williamson
2016-11-16 19:12                 ` Kirti Wankhede
2016-11-16 19:45                   ` Alex Williamson
2016-11-17  5:24                     ` Jike Song
2016-11-17  6:03                       ` Alex Williamson
2016-11-17  6:27                         ` Jike Song
2016-11-17 12:31                         ` Jike Song
2016-11-17 16:22                           ` Alex Williamson
2016-11-18 10:39                             ` Jike Song
2016-11-15 11:35 ` [v4 3/3] kvm: notify vfio on attaching and detaching Jike Song

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=1479209747-5564-1-git-send-email-jike.song@intel.com \
    --to=jike.song@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=cjia@nvidia.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=pbonzini@redhat.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 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.