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,
jike.song@intel.com, kvm@vger.kernel.org
Subject: [v6 0/3] plumb kvm/vfio to notify kvm:group attach/detach
Date: Fri, 18 Nov 2016 19:01:46 +0800 [thread overview]
Message-ID: <1479466909-31765-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.
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
next reply other threads:[~2016-11-18 11:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 11:01 Jike Song [this message]
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
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=1479466909-31765-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 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).