Re: [RFC PATCH 1/4] PCI/TSM: Create MMIO descriptors via TDISP Report
From: Xu Yilun
Date: Fri Oct 16 2026 - 08:44:56 EST
> pci_tsm_mmio_alloc() also recovers the obfuscated starting address for
> each encrypted MMIO range, since the VM is never disclosed the HPA
> that correlates to the GPA of the device's MMIO. The obfuscated
> address is BAR aligned.
Could you help specify in the changelog how to ensure the obfuscated
address BAR aligned. I believe this is not mandated in PCI TDISP spec,
so we need to let all TSM vendors know about the rule.
I remember it is done by TSM setting the MMIO_REPORTING_OFFSET as the
largest BAR size on LOCK_INTERFACE_REQUEST, is it?
[...]
> +/**
> + * struct pci_tsm_mmio_entry - an encrypted MMIO range
> + * @res: MMIO address range (typically Guest Physical Address, GPA)
> + * @tsm_offset: Host Physical Address, HPA obfuscation offset added by the TSM.
> + * Translates report addresses to GPA.
> + */
> +struct pci_tsm_mmio_entry {
> + struct resource res;
> + u64 tsm_offset;
I remember Intel TDX once wanted this tsm_offset stored here. TDX
firmware needed this field to identify which private mmio range the
CoCo-VM want to accept.
But now TDX switch to use mmio_range_index. See this link:
https://lore.kernel.org/all/20260924041032.1096569-8-zhenzhong.duan@xxxxxxxxx/
So could you help switch to store the range index? I believe no vendor
needs the obfuscated HPA now.
> +};