> On 11 Dec 2025, at 20:24, Richard Henderson <[email protected]> > wrote: > > WARNING: This email originated from outside of Qualcomm. Please be wary of > any links or attachments, and do not enable macros. > > On 12/11/25 12:49, Mark Burton wrote: >>> Adding the as to CPUTLBEntryFull is unnecessary because >>> >>> (1) Each CPUTLB, and thus each CPUTLBEntryFull, is private to the cpu. >>> (2) Each CPUTLBEntryFull contains the MemTxAttrs for the access. >>> >>> Thus the AddressSpace is purely a function of (cpu, attrs). >> >> The issue is, it would seem, it is also a function of the lookup provided by >> an IOMMU access - that kindly provides an address space independent of any >> CPU. > > No, it really isn't. > > Because you think that, it seems like you're doing something wrong with IOMMU > accesses. > Since I don't know the wider context of the query means I don't know how to > help you further. > > My shot in the dark: there is a flush that's supposed to happen for changes > to a cpu's > address space. There are plenty of ways in which this happens, e.g. x86 a20 > translation > line and pci bar changes. I forget the exact details when it comes to IOMMU, > but there > must be something related when translations change. The actual tcg flush > will happen via > the MemoryListener interface.
I am absolutely prepared to believe I’m handling the IOMMU incorrectly The setup I’m using is CPU->SMMU(TBU)->AddressSpace (totally unconnected from the CPU). What I see in the code is that the IOMMU is permitted to return an address space - that address space, in the cases I have, is totally unrelated to the CPU concerned. The CPU knows (till now), nothing about that address space. The address space being returned from the IOMMU translate doesn’t seem to be used - so I’m not overly surprised that we end up in the wrong place. Perhaps what you’re saying is that somehow we should be ‘registering’ this address space with (any?) CPU that could potentially get to it... What I see is that io_prepare calls down and gets the target_as from the IOMMU translate cb, but it only returns MemroyRegionSection, not the target_as, and then e.g. int_st_mmio_leN seems to use cpu->as and index’s from that ….. I don’t see what I can be missing? Cheers Mark. > > > r~
