On 2/2/26 17:53, Jim Shu wrote:
Pass the access_type so that we could know CPU will do the read or write access. Then, CPU can fill the CPUTLBEntry[Full] of the specific permission (@prot).
This is wrong. tlb_set_page* is recording data for *any* future translation. There is no one access_type which is appropriate.
I know you're trying to handle cpu-side iommu translation, and that you have a case which requires reads and writes to go to different address spaces (?), but this doesn't help.
I think the underlying issue is that, for your case, we're handling iommu too early -- we want to be able to defer the translation until the actual access.
r~
