[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested S
From: |
Eric Auger |
Subject: |
Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3 |
Date: |
Fri, 31 Jan 2025 17:08:28 +0100 |
User-agent: |
Mozilla Thunderbird |
Hi,
On 1/31/25 4:23 PM, Shameerali Kolothum Thodi wrote:
>
>> -----Original Message-----
>> From: Jason Gunthorpe <jgg@nvidia.com>
>> Sent: Friday, January 31, 2025 2:54 PM
>> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
>> Cc: Daniel P. Berrangé <berrange@redhat.com>; qemu-arm@nongnu.org;
>> qemu-devel@nongnu.org; eric.auger@redhat.com;
>> peter.maydell@linaro.org; nicolinc@nvidia.com; ddutile@redhat.com;
>> Linuxarm <linuxarm@huawei.com>; Wangzhou (B)
>> <wangzhou1@hisilicon.com>; jiangkunkun <jiangkunkun@huawei.com>;
>> Jonathan Cameron <jonathan.cameron@huawei.com>;
>> zhangfei.gao@linaro.org; Nathan Chen <nathanc@nvidia.com>
>> Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable
>> nested SMMUv3
>>
>> On Fri, Jan 31, 2025 at 02:39:53PM +0000, Shameerali Kolothum Thodi
>> wrote:
>>
>>>>> And Qemu does some checking to make sure that the device is indeed
>>>> associated
>>>>> with the specified phys-smmuv3. This can be done going through the
>>>> sysfs path checking
>>>>> which is what I guess libvirt is currently doing to populate the
>> topology.
>>>> So basically
>>>>> Qemu is just replicating that to validate again.
>>>> I would prefer that iommufd users not have to go out to sysfs..
>>>>
>>>>> Or another option is extending the IOMMU_GET_HW_INFO IOCTL to
>>>> return the phys
>>>>> smmuv3 base address which can avoid going through the sysfs.
>>>> It also doesn't seem great to expose a physical address. But we could
>>>> have an 'iommu instance id' that was a unique small integer?
>>> Ok. But how the user space can map that to the device?
>> Why does it need to?
>>
>> libvirt picks some label for the vsmmu instance, it doesn't matter
>> what the string is.
>>
>> qemu validates that all of the vsmmu instances are only linked to PCI
>> device that have the same iommu ID. This is already happening in the
>> kernel, it will fail attaches to mismatched instances.
>>
>> Nothing further is needed?
> -device pxb-pcie,id=pcie.1,bus_nr=8,bus=pcie.0 \
> -device pcie-root-port,id=pcie.port1,bus=pcie.1,chassis=1 \
> -device arm-smmuv3-accel,bus=pcie.1,id=smmuv1 \
I don't get what is the point of adding such an id if it is not
referenced anywhere?
Eric
> -device vfio-pci,host=0000:7d:02.1,bus=pcie.port1,iommufd=iommufd0 \
>
> -device pxb-pcie,id=pcie.2,bus_nr=16,bus=pcie.0 \
> -device pcie-root-port,id=pcie.port2,bus=pcie.2,chassis=2 \
> -device arm-smmuv3-accel,pci-bus=pcie.2,id=smmuv2 \
> -device vfio-pci,host=0000:75:00.1,bus=pcie.port2,iommufd=iommufd0 \
>
> I think it works from a functionality point of view. A particular
> instance of arm-smmuv3-accel(say id=smmuv1) can only have devices attached
> to the same phys smmuv3 "iommu instance id"
>
> But not sure from a libvirt/Qemu interface point of view[0] the concerns
> are addressed. Daniel/Nathan?
>
> Thanks,
> Shameer
> https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/X6R52JRBYDFZ5PSJFR534A655UZ3RHKN/
>
- RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, (continued)
- Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Daniel P . Berrangé, 2025/01/30
- RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Shameerali Kolothum Thodi, 2025/01/30
- RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Shameerali Kolothum Thodi, 2025/01/31
- Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Eric Auger, 2025/01/31
- Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Jason Gunthorpe, 2025/01/31
- RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Shameerali Kolothum Thodi, 2025/01/31
- Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Jason Gunthorpe, 2025/01/31
- RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Shameerali Kolothum Thodi, 2025/01/31
- Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3,
Eric Auger <=
- Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Daniel P . Berrangé, 2025/01/31
Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3, Daniel P . Berrangé, 2025/01/30