Re: [PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU

2024-07-11 Thread Jason Gunthorpe
On Thu, Jul 11, 2024 at 08:48:10AM -0700, Andrea Bolognani wrote: > IIUC having devices associated to the "correct" SMMU is only a > requirement for optimal performance, not pure functionality, right? > In other words, getting the association wrong will make things slower > but they will keep work

Re: [PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU

2024-07-11 Thread Andrea Bolognani
On Tue, Jul 09, 2024 at 10:59:30AM GMT, Nicolin Chen wrote: > On Tue, Jul 09, 2024 at 03:26:58PM +0200, Eric Auger wrote: > > > +/* Build PCI Expander Bridge + Root Port from the top of PCI_BUS_MAX > > > */ > > > +if (vms->num_nested_smmus) { > > > +/* VIRT_NESTED_SMMU must hold al

Re: [PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU

2024-07-09 Thread Nicolin Chen
On Tue, Jul 09, 2024 at 03:26:58PM +0200, Eric Auger wrote: > > @@ -1580,12 +1647,33 @@ static void create_pcie(VirtMachineState *vms) > > qemu_fdt_setprop_cell(ms->fdt, nodename, "#interrupt-cells", 1); > > create_pcie_irq_map(ms, vms->gic_phandle, irq, nodename); > > > > -if (vms->

Re: [PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU

2024-07-09 Thread Eric Auger
Hi Nicolin, On 6/26/24 02:28, Nicolin Chen wrote: > VIRT_SMMU can be used as an emulated SMMU, i.e. iommu=smmuv3. However, the > MMIO space for VIRT_SMMU isn't large enough to accommodate multiple nested > SMMUv3 instances. Add a new VIRT_NESTED_SMMU to separate MMIO space. > > Meanwhile, a nested

[PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU

2024-06-25 Thread Nicolin Chen
VIRT_SMMU can be used as an emulated SMMU, i.e. iommu=smmuv3. However, the MMIO space for VIRT_SMMU isn't large enough to accommodate multiple nested SMMUv3 instances. Add a new VIRT_NESTED_SMMU to separate MMIO space. Meanwhile, a nested SMMUv3 could only work with a vfio-pci device that is physi