qemu-e2k/hw/vfio
Alex Williamson 238e917285 vfio/ccw/pci: Allow devices to opt-in for ballooning
If a vfio assigned device makes use of a physical IOMMU, then memory
ballooning is necessarily inhibited due to the page pinning, lack of
page level granularity at the IOMMU, and sufficient notifiers to both
remove the page on balloon inflation and add it back on deflation.
However, not all devices are backed by a physical IOMMU.  In the case
of mediated devices, if a vendor driver is well synchronized with the
guest driver, such that only pages actively used by the guest driver
are pinned by the host mdev vendor driver, then there should be no
overlap between pages available for the balloon driver and pages
actively in use by the device.  Under these conditions, ballooning
should be safe.

vfio-ccw devices are always mediated devices and always operate under
the constraints above.  Therefore we can consider all vfio-ccw devices
as balloon compatible.

The situation is far from straightforward with vfio-pci.  These
devices can be physical devices with physical IOMMU backing or
mediated devices where it is unknown whether a physical IOMMU is in
use or whether the vendor driver is well synchronized to the working
set of the guest driver.  The safest approach is therefore to assume
all vfio-pci devices are incompatible with ballooning, but allow user
opt-in should they have further insight into mediated devices.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2018-08-17 09:27:16 -06:00
..
amd-xgbe.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
calxeda-xgmac.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
ccw.c vfio/ccw/pci: Allow devices to opt-in for ballooning 2018-08-17 09:27:16 -06:00
common.c vfio/ccw/pci: Allow devices to opt-in for ballooning 2018-08-17 09:27:16 -06:00
display.c ui: introduce vfio_display_reset 2018-04-27 11:36:34 +02:00
Makefile.objs vfio/display: core & wireup 2018-03-13 11:17:29 -06:00
pci-quirks.c hw/vfio: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
pci.c vfio/ccw/pci: Allow devices to opt-in for ballooning 2018-08-17 09:27:16 -06:00
pci.h vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly 2018-06-05 08:28:09 -06:00
platform.c vfio: Include "exec/address-spaces.h" directly in the source file 2018-05-31 19:12:13 +02:00
spapr.c vfio, spapr: Fix levels calculation 2017-09-15 10:29:48 +10:00
trace-events vfio/ccw/pci: Allow devices to opt-in for ballooning 2018-08-17 09:27:16 -06:00