hw/pci: Introduce pci_device_[set|unset]_iommu_device()
authorYi Liu <yi.l.liu@intel.com>
Wed, 5 Jun 2024 08:30:39 +0000 (16:30 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:30 +0000 (23:15 +0200)
commitb025ea6886fbea80f0c3ab7e54b4cfa7040ab8bf
treeeeccac824a1373b0505ef34e5ec280bae0279bf3
parent6c8ed5fea1ff60167736d530e39f3903a826df20
hw/pci: Introduce pci_device_[set|unset]_iommu_device()

pci_device_[set|unset]_iommu_device() call pci_device_get_iommu_bus_devfn()
to get iommu_bus->iommu_ops and call [set|unset]_iommu_device callback to
set/unset HostIOMMUDevice for a given PCI device.

Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci/pci.c
include/hw/pci/pci.h