Skip to content

Drop unneeded cache flushing

Rick Edgecombe kvm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesIn review
  2. v12 patches 17 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/virt/tdx: Drop tdx_clflush_*()arch/x86/virt/vmx/tdx/tdx.c+0 -231 reply
2/2x86/virt/tdx: Drop tdh_phymem_page_wbinvd_*()arch/x86/include/asm/tdx.h arch/x86/kvm/vmx/tdx.c arch/x86/virt/vmx/tdx/tdx.c +1 more+6 -632 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYan ZhaoBinbin WuNikolay BorisovXu YilunKiryl Shutsemau (Meta)Tony Lindgren
SeriesR-b R-b R-b
1/2R-b R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/2] Drop unneeded cache flushing

Hi TDX developers,

Can I get another round of review before we ask Dave and Sean to look at it? I'd like to pick up a few more RB tags.

-- Summary --

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.

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 that non-4KB sizes are not supported.[0]

-- Changes since v1 --

Yilun asked if we could also remove the WBINVD calls around kexec and TDX setup error paths. It seems the answer is likely yes, but not confirmed enough for me yet. So I left that change for the future. Besides, it doesn't have the same TDX huge page intersection.

Yilun's comment about cleaning up the TDR reclaim after the changes in patch 2 was a bit bigger that I expected. I really debated whether to split that out. But it wasn't very feasible to do it as a prep patch, so I left it as one big bigger. Really debated doing that, or an follow up cleanup patch. Opinions requested.

Based on v7.3-rc7.

Thanks,

Rick

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      | 40 +++++-------------------------
 arch/x86/virt/vmx/tdx/tdx.c | 49 -------------------------------------
 arch/x86/virt/vmx/tdx/tdx.h |  1 -
 4 files changed, 6 insertions(+), 86 deletions(-)
Signature · 1 line
2.55.0