On Fri, Oct 31, 2025 at 10:49:49AM +0000, Shameer Kolothum wrote:
> +static AddressSpace *smmuv3_accel_get_msi_as(PCIBus *bus, void *opaque,
> + int devfn)
> +{
> + SMMUState *bs = opaque;
> + SMMUPciBus *sbus = smmu_get_sbus(bs, bus);
> + SMMUv3AccelDevice *accel_dev = smmuv3_accel_get_dev(bs, sbus, bus,
> devfn);
> + SMMUDevice *sdev = &accel_dev->sdev;
> +
> + /*
> + * If the assigned vfio-pci dev has S1 translation enabled by Guest,
> + * return IOMMU address space for MSI translation. Otherwise, return
> + * system address space.
> + */
> + if (accel_dev->s1_hwpt) {
> + return &sdev->as;
> + } else {
> + return &address_space_memory;
Should we use the global shared_as? Or is this on purpose to align
with the "&address_space_memory" in kvm_arch_fixup_msi_route()?
Nicolin