Hi TDX developers,
Can I get a round of review before we ask Dave and Sean to look at it?
In the early days of TDX it was assumed the HW would need some cache
flushing help around transitioning memory between KeyIDs, and so TDX arch
was designed to specify how the VMM needed to help the module perform
this. But it turned out the HW was able to handle these issues without SW
help. For some reason the TDX arch around performing the flushes remained.
Now the TDX arch is getting fixed and Linux can remove the code that was
helping perform this unneeded cache flushing. The changes will appear in
a future documentation update.
Especially, please consider if the explanation is clear enough for
maintainers and future git archaeologists.
As some more context, while this is nice cleanup as is, merging these
patches will let us drop 2 patches out of the TDX huge pages series. Then
that series doesn't need to modify these flushes to work with TDX huge
pages. It also addresses Kiryl's comment about the cache flushing in
tdh_mem_page_aug() not respecting the 'level' arg, or warning about that
non-4KB sizes are not supported.[0]
Based on v7.3-rc1.
Thanks,
Rick
[0] https://lore.kernel.org/lkml/20260825025533.25663-1-yan.y.zhao@intel.com/#t
Rick Edgecombe (2):
x86/virt/tdx: Drop tdx_clflush_*()
x86/virt/tdx: Drop tdh_phymem_page_wbinvd_*()
arch/x86/include/asm/tdx.h | 2 --
arch/x86/kvm/vmx/tdx.c | 14 -----------
arch/x86/virt/vmx/tdx/tdx.c | 49 -------------------------------------
arch/x86/virt/vmx/tdx/tdx.h | 1 -
4 files changed, 66 deletions(-)
--
2.55.0