[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFCv1 07/10] hw/arm/virt: Bypass iommu for default PCI bus
From: |
Nicolin Chen |
Subject: |
[PATCH RFCv1 07/10] hw/arm/virt: Bypass iommu for default PCI bus |
Date: |
Tue, 25 Jun 2024 17:28:34 -0700 |
Now, all passthrough devices that should benefit from the nested SMMUv3
feature are assigned to dedicated pxb buses. So, the default PCI bus can
be only used by emulated devices.
In theory, these emualted devices can be still attached to an emualted
SMMUv3 instance, yet there is no gain doing that. Set the default PCI bus
to bypass iommu, for the maximum performance.
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
hw/arm/virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 3610f53304..5e91dc8c3d 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1708,7 +1708,8 @@ static void create_pcie(VirtMachineState *vms)
}
pci = PCI_HOST_BRIDGE(dev);
- pci->bypass_iommu = vms->default_bus_bypass_iommu;
+ /* Default bus used by emulated devices does not go through nested SMMUs */
+ pci->bypass_iommu = vms->default_bus_bypass_iommu || vms->num_nested_smmus;
vms->bus = pci->bus;
if (vms->bus) {
pci_init_nic_devices(pci->bus, mc->default_nic);
--
2.43.0
- [PATCH RFCv1 00/10] hw/arm/virt: Add multiple nested SMMUs, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 01/10] hw/arm/virt-acpi-build: Add IORT RMR regions to handle MSI nested binding, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 02/10] hw/arm/virt: Add iommufd link to virt-machine, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 03/10] hw/arm/virt: Get the number of host-level SMMUv3 instances, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 06/10] hw/arm/virt: Assign vfio-pci devices to nested SMMUs, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 07/10] hw/arm/virt: Bypass iommu for default PCI bus,
Nicolin Chen <=
- [PATCH RFCv1 09/10] hw/arm/virt-acpi-build: Build IORT with multiple SMMU nodes, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 04/10] hw/arm/virt: Add an SMMU_IO_LEN macro, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 10/10] hw/arm/virt-acpi-build: Enable ATS for nested SMMUv3, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 08/10] hw/arm/virt-acpi-build: Handle reserved bus number of pxb buses, Nicolin Chen, 2024/06/25