mbox series

[v3,0/6] vpci: first series in preparation for vpci on ARM

Message ID 20230314205612.3703668-1-volodymyr_babchuk@epam.com (mailing list archive)
Headers show
Series vpci: first series in preparation for vpci on ARM | expand

Message

Volodymyr Babchuk March 14, 2023, 8:56 p.m. UTC
This patch set is spiritual successor of "[PATCH v2 0/4] vpci: first
series in preparation for vpci on ARM". But most of the contents was
reworked. Main aim of those patches is to allow vPCI MMIO handlers to
work with DomUs, not only with Dom0. To do this, we need protect pdev
from being removed while still in use.

Jan suggested to use reference counting for this. So this series
include patches from other series ("[RFC] Rework PCI locking") that
implement reference counting for pdevs.

With reference counting implemented, it would be possible to make
further rework of PCI locking.

Oleksandr Andrushchenko (1):
  vpci: restrict unhandled read/write operations for guests

Volodymyr Babchuk (5):
  xen: add reference counter support
  xen: pci: introduce reference counting for pdev
  vpci: crash domain if we wasn't able to (un) map vPCI regions
  vpci: use reference counter to protect vpci state
  xen: pci: print reference counter when dumping pci_devs

 xen/arch/x86/hvm/vmsi.c                  |   2 +-
 xen/arch/x86/irq.c                       |   4 +
 xen/arch/x86/msi.c                       |  44 ++++++-
 xen/arch/x86/pci.c                       |   3 +
 xen/arch/x86/physdev.c                   |  17 ++-
 xen/common/sysctl.c                      |   7 +-
 xen/drivers/passthrough/amd/iommu_init.c |  12 +-
 xen/drivers/passthrough/amd/iommu_map.c  |   6 +-
 xen/drivers/passthrough/pci.c            | 141 +++++++++++++++--------
 xen/drivers/passthrough/vtd/quirks.c     |   2 +
 xen/drivers/video/vga.c                  |   7 +-
 xen/drivers/vpci/header.c                |  11 +-
 xen/drivers/vpci/vpci.c                  |  31 ++++-
 xen/include/xen/pci.h                    |  18 +++
 xen/include/xen/refcnt.h                 |  59 ++++++++++
 15 files changed, 293 insertions(+), 71 deletions(-)
 create mode 100644 xen/include/xen/refcnt.h