diff options
author | Xingang Wang <wangxingang5@huawei.com> | 2021-07-08 12:55:11 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-07-16 11:10:45 -0400 |
commit | 2d64b7bbb2a2e945635633486ef9a060cb2c89bc (patch) | |
tree | 0acc3b05c6b68d81ae923f1715aab953dd401a1c /include/hw/pci | |
parent | 7395b3e3e70031b1efff7941cbef6a1ceb6f2ffd (diff) | |
download | qemu-2d64b7bbb2a2e945635633486ef9a060cb2c89bc.zip qemu-2d64b7bbb2a2e945635633486ef9a060cb2c89bc.tar.gz qemu-2d64b7bbb2a2e945635633486ef9a060cb2c89bc.tar.bz2 |
hw/pci/pci_host: Allow PCI host to bypass iommu
Add a new bypass_iommu property for PCI host and use it to check
whether devices attached to the PCI root bus will bypass iommu.
In pci_device_iommu_address_space(), check the property and
avoid getting iommu address space for devices bypass iommu.
Signed-off-by: Xingang Wang <wangxingang5@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <1625748919-52456-2-git-send-email-wangxingang5@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/pci')
-rw-r--r-- | include/hw/pci/pci.h | 1 | ||||
-rw-r--r-- | include/hw/pci/pci_host.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 6be4e0c..f4d51b6 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -480,6 +480,7 @@ void pci_for_each_bus(PCIBus *bus, PCIBus *pci_device_root_bus(const PCIDevice *d); const char *pci_root_bus_path(PCIDevice *dev); +bool pci_bus_bypass_iommu(PCIBus *bus); PCIDevice *pci_find_device(PCIBus *bus, int bus_num, uint8_t devfn); int pci_qdev_find_device(const char *id, PCIDevice **pdev); void pci_bus_get_w64_range(PCIBus *bus, Range *range); diff --git a/include/hw/pci/pci_host.h b/include/hw/pci/pci_host.h index 52e038c..c6f4eb4 100644 --- a/include/hw/pci/pci_host.h +++ b/include/hw/pci/pci_host.h @@ -43,6 +43,7 @@ struct PCIHostState { uint32_t config_reg; bool mig_enabled; PCIBus *bus; + bool bypass_iommu; QLIST_ENTRY(PCIHostState) next; }; |