> -----Original Message----- > From: Eric Auger <[email protected]> > Sent: Wednesday, March 19, 2025 4:46 PM > To: Nicolin Chen <[email protected]> > Cc: Shameerali Kolothum Thodi > <[email protected]>; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; Linuxarm > <[email protected]>; Wangzhou (B) <[email protected]>; > jiangkunkun <[email protected]>; Jonathan Cameron > <[email protected]>; [email protected] > Subject: Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial > infrastructure for smmuv3-accel device > >>> Is there any benefit from emulated devices working in the HW- > >>> accelerated nested translation mode? > >> Not really but do we have any justification for using different device > >> name in accel mode? I am not even sure that accel option is really > >> needed. Ideally the qemu device should be able to detect it is > >> protecting a VFIO device, in which case it shall check whether nested is > >> supported by host SMMU and then automatically turn accel mode? > >> > >> I gave the example of the vfio device which has different class > >> implementration depending on the iommufd option being set or not. > > Do you mean that we should just create a regular smmuv3 device and > > let a VFIO device to turn on this smmuv3's accel mode depending on > > its LEGACY/IOMMUFD class? > > no this is not what I meant. I gave an example where depending on an > option passed to thye VFIO device you choose one class implement or the > other. > > > > Another question: how does an emulated device work with a vSMMUv3? > I don't get your question. vSMMUv3 currently only works with emulated > devices. Did you mean accelerated SMMUv3? > > I could imagine that all the accel steps would be bypassed since > > !sdev->idev. Yet, the emulated iotlb should cache its translation > > so we will need to flush the iotlb, which will increase complexity > > as the TLBI command dispatching function will need to be aware what > > ASID is for emulated device and what is for vfio device.. > I don't get the issue. For emulated device you go through the usual > translate path which indeed caches configs and translations. In case the > guest invalidates something, you know the SID and you find the entries > in the cache that are tagged by this SID.
Not always you get sid, eg: CMD_TLBI_NH_ASID Thanks, Shameer
