On Fri, Apr 1, 2022 at 9:43 PM Yi Liu <yi.l....@intel.com> wrote: > > > > On 2022/3/29 12:54, Jason Wang wrote: > > > > 在 2022/3/28 下午4:45, Yi Liu 写道: > >> > >> > >> On 2022/3/21 13:54, Jason Wang wrote: > >>> This patch introduce ECAP_PASID via "x-pasid-mode". Based on the > >>> existing support for scalable mode, we need to implement the following > >>> missing parts: > >>> > >>> 1) tag VTDAddressSpace with PASID and support IOMMU/DMA translation > >>> with PASID > >> > >> should it be tagging with bdf+pasid? > > > > > > The problem is BDF is programmable by the guest. So we may end up > > duplicated BDFs. That's why the code uses struct PCIBus. > > how about the devfn? will it also change?
The code has already used devfn, doesn't it? struct vtd_as_key { PCIBus *bus; uint8_t devfn; uint32_t pasid; }; Thanks > taggiing addressspace with > BDF+PASID mostly suits the spec since the PASID table is per-bdf. If > bus number may change, using PCIBus is fine. > > Regards, > Yi Liu >