[PATCH v2 0/2] Two minor fixes on virtio-iommu and smmu

Zhenzhong Duan posted 2 patches 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240125073706.339369-1-zhenzhong.duan@intel.com
Maintainers: Eric Auger <eric.auger@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>
hw/arm/smmu-common.c     | 2 ++
hw/virtio/virtio-iommu.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
[PATCH v2 0/2] Two minor fixes on virtio-iommu and smmu
Posted by Zhenzhong Duan 10 months ago
Hi,

PATCH1 fixes a potential issue with vfio devices when reboot to a
different OS which set bus number differently from previous OS.
I didn't reproduce the issue in reality, but it's still possible
in theory. VTD doesn't have same issue as it use some verify logic
to ensure right iommu MR is picked.

PATCH2 does same thing for smmu.

v2:
- Remove redundant memset in realize (Cédric)
- Add a patch for smmu (Eric)
- Drop the patch to support PCI device alias for now, as it's tricky in
  using two different IOMMU MRs and Eric already sent a smarter fix.


Thanks
Zhenzhong

Zhenzhong Duan (2):
  virtio_iommu: Clear IOMMUPciBus pointer cache when system reset
  smmu: Clear SMMUPciBus pointer cache when system reset

 hw/arm/smmu-common.c     | 2 ++
 hw/virtio/virtio-iommu.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.34.1


Re: [PATCH v2 0/2] Two minor fixes on virtio-iommu and smmu
Posted by Eric Auger 10 months ago
Hi Zhenzhong,

On 1/25/24 08:37, Zhenzhong Duan wrote:
> Hi,
>
> PATCH1 fixes a potential issue with vfio devices when reboot to a
> different OS which set bus number differently from previous OS.
> I didn't reproduce the issue in reality, but it's still possible
> in theory. VTD doesn't have same issue as it use some verify logic
> to ensure right iommu MR is picked.
>
> PATCH2 does same thing for smmu.
>
> v2:
> - Remove redundant memset in realize (Cédric)
> - Add a patch for smmu (Eric)
> - Drop the patch to support PCI device alias for now, as it's tricky in
>   using two different IOMMU MRs and Eric already sent a smarter fix.

For the series:

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric

>
>
> Thanks
> Zhenzhong
>
> Zhenzhong Duan (2):
>   virtio_iommu: Clear IOMMUPciBus pointer cache when system reset
>   smmu: Clear SMMUPciBus pointer cache when system reset
>
>  hw/arm/smmu-common.c     | 2 ++
>  hw/virtio/virtio-iommu.c | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>


RE: [PATCH v2 0/2] Two minor fixes on virtio-iommu and smmu
Posted by Duan, Zhenzhong 10 months ago

>-----Original Message-----
>From: Eric Auger <eric.auger@redhat.com>
>Subject: Re: [PATCH v2 0/2] Two minor fixes on virtio-iommu and smmu
>
>Hi Zhenzhong,
>
>On 1/25/24 08:37, Zhenzhong Duan wrote:
>> Hi,
>>
>> PATCH1 fixes a potential issue with vfio devices when reboot to a
>> different OS which set bus number differently from previous OS.
>> I didn't reproduce the issue in reality, but it's still possible
>> in theory. VTD doesn't have same issue as it use some verify logic
>> to ensure right iommu MR is picked.
>>
>> PATCH2 does same thing for smmu.
>>
>> v2:
>> - Remove redundant memset in realize (Cédric)
>> - Add a patch for smmu (Eric)
>> - Drop the patch to support PCI device alias for now, as it's tricky in
>>   using two different IOMMU MRs and Eric already sent a smarter fix.
>
>For the series:
>
>Reviewed-by: Eric Auger <eric.auger@redhat.com>
>Tested-by: Eric Auger <eric.auger@redhat.com>

Thanks Eric.

BRs.
Zhenzhong