qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] QEMU: Dynamic trap/untrap of VFIO PCI BARs
@ 2019-12-05  3:44 Yan Zhao
  2019-12-05  3:45 ` [RFC PATCH 1/2] hw/vfio: add a 'disablable' flag to sparse mmaped region Yan Zhao
  2019-12-05  3:45 ` [RFC PATCH 2/2] hw/vfio/pci: init dynamic-trap-bar-info region Yan Zhao
  0 siblings, 2 replies; 3+ messages in thread
From: Yan Zhao @ 2019-12-05  3:44 UTC (permalink / raw)
  To: alex.williamson
  Cc: kevin.tian, Yan Zhao, cohuck, qemu-devel, zhenyuw, shaopeng.he,
	zhi.a.wang

This patchset enables PCI BARs to be dynamically trapped/passthroughed
in response to vendor driver's needs.

To dynamic trap/untrap PCI BARs, 3 info required:
(1) which part of PCI BARs are to be trapped/passthroughed
(2) when to do the trap/passthrough transition
(3) to trap or to passthrough

Patch 1 let vendor driver specify which sparse mmaped subregions are
disablable. Therefore providing the first info.

Patch 2 probes and creates dynamic trap bar info region, whose
"dt_fd" field provides the second info, and
"trap" field provide the third info.

The corresponding kernel implementation is at
https://www.spinics.net/lists/kernel/msg3337337.html.


Yan Zhao (2):
  hw/vfio: add a 'disablable' flag to sparse mmaped region
  hw/vfio/pci: init dynamic-trap-bar-info region

 hw/vfio/common.c              |  28 +++++++-
 hw/vfio/pci.c                 | 117 ++++++++++++++++++++++++++++++++++
 hw/vfio/pci.h                 |   5 ++
 hw/vfio/trace-events          |   4 +-
 include/hw/vfio/vfio-common.h |   2 +
 linux-headers/linux/vfio.h    |  13 ++++
 6 files changed, 167 insertions(+), 2 deletions(-)

-- 
2.17.1



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

end of thread, other threads:[~2019-12-05  3:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05  3:44 [RFC PATCH 0/2] QEMU: Dynamic trap/untrap of VFIO PCI BARs Yan Zhao
2019-12-05  3:45 ` [RFC PATCH 1/2] hw/vfio: add a 'disablable' flag to sparse mmaped region Yan Zhao
2019-12-05  3:45 ` [RFC PATCH 2/2] hw/vfio/pci: init dynamic-trap-bar-info region Yan Zhao

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