]> git.ipfire.org Git - thirdparty/qemu.git/commit
intel_iommu: Implement [set|unset]_iommu_device() callbacks
authorYi Liu <yi.l.liu@intel.com>
Wed, 5 Jun 2024 08:30:42 +0000 (16:30 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:30 +0000 (23:15 +0200)
commita20910ca3e283b10585c71061746ea6b1fa6ca91
treec1d2427fe5959213ff4a9c581e0ab40d03124bb4
parentd5fd978d918516b7bc4224de432c7ef93ec089a3
intel_iommu: Implement [set|unset]_iommu_device() callbacks

Implement [set|unset]_iommu_device() callbacks in Intel vIOMMU.
In set call, we take a reference of HostIOMMUDevice and store it
in hash table indexed by PCI BDF.

Note this BDF index is device's real BDF not the aliased one which
is different from the index of VTDAddressSpace. There can be multiple
assigned devices under same virtual iommu group and share same
VTDAddressSpace, but each has its own HostIOMMUDevice.

Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.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/i386/intel_iommu.c
include/hw/i386/intel_iommu.h