On Thu, Jul 10, 2025 at 04:57:25PM +1000, Alexey Kardashevskiy wrote: > Currently I handle this from the KVM with a hack to get IOPDE from > AMD IOMMU so both 2MB RMP entry and IOPDE entries are smashed in one > go in one of many firmwares running on EPYC, and atm this is too > hacky to be posted even as an RFC. This likely needs to move to > IOMMUFD then (via some callbacks) which could call AMD IOMMU which > then would call that firmware (called "TMPM" and it is not the PSP > which is "TSM), probably. Thanks, Wasn't the issue with the iommu that it needed to have a PTE break whenever the shared/private changed in the RMP? Because the HW can't handle an IOPTE that crosses more than one RMP entry? Or do I misunderstand the problem? If this is the problem I was expecting the page table code that translates the guest memfd into the iommu PTEs would respect the shared/private conversion boundaries and break up the PTEs automatically. I had thought there were three versions of of how to copy from guest memfd into the IOPTEs: - HW must never have a private physaddr in an IOPTE - HW must have IOPTEs entirely private or shared - HW handles everything and IOPTEs should be maximally sized Is this right? Is AMD #2? Jason