kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] x86/tdx: Skip clearing reclaimed pages unless X86_BUG_TDX_PW_MCE is present
@ 2025-07-03 15:37 Adrian Hunter
  2025-07-03 15:37 ` [PATCH V2 1/2] x86/tdx: Eliminate duplicate code in tdx_clear_page() Adrian Hunter
  2025-07-03 15:37 ` [PATCH V2 2/2] x86/tdx: Skip clearing reclaimed pages unless X86_BUG_TDX_PW_MCE is present Adrian Hunter
  0 siblings, 2 replies; 21+ messages in thread
From: Adrian Hunter @ 2025-07-03 15:37 UTC (permalink / raw)
  To: Dave Hansen, pbonzini, seanjc, vannapurve
  Cc: Tony Luck, Borislav Petkov, Thomas Gleixner, Ingo Molnar, x86,
	H Peter Anvin, linux-kernel, kvm, rick.p.edgecombe,
	kirill.shutemov, kai.huang, reinette.chatre, xiaoyao.li,
	tony.lindgren, binbin.wu, isaku.yamahata, yan.y.zhao, chao.gao

Hi

Here are 2 small self-explanatory patches related to clearing TDX private
pages.

Patch 1 is a minor tidy-up.

In patch 2, by skipping the clearing step, shutdown time can improve by
up to 40%.


Changes in V2 (as requested by Dave):

      x86/tdx: Eliminate duplicate code in tdx_clear_page()
	Rename reset_tdx_pages() to tdx_quirk_reset_paddr()
	Call tdx_quirk_reset_paddr() directly

      x86/tdx: Skip clearing reclaimed pages unless X86_BUG_TDX_PW_MCE is present
	Improve the comment


Adrian Hunter (2):
      x86/tdx: Eliminate duplicate code in tdx_clear_page()
      x86/tdx: Skip clearing reclaimed pages unless X86_BUG_TDX_PW_MCE is present

 arch/x86/include/asm/tdx.h  |  2 ++
 arch/x86/kvm/vmx/tdx.c      | 25 +++----------------------
 arch/x86/virt/vmx/tdx/tdx.c | 13 +++++++++++--
 3 files changed, 16 insertions(+), 24 deletions(-)


Regards
Adrian

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-07-07 23:32 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 15:37 [PATCH V2 0/2] x86/tdx: Skip clearing reclaimed pages unless X86_BUG_TDX_PW_MCE is present Adrian Hunter
2025-07-03 15:37 ` [PATCH V2 1/2] x86/tdx: Eliminate duplicate code in tdx_clear_page() Adrian Hunter
2025-07-03 16:34   ` Kirill A. Shutemov
2025-07-04  6:44   ` Binbin Wu
2025-07-04 15:33   ` Xiaoyao Li
2025-07-07  2:08   ` Huang, Kai
2025-07-07 17:31   ` Edgecombe, Rick P
2025-07-03 15:37 ` [PATCH V2 2/2] x86/tdx: Skip clearing reclaimed pages unless X86_BUG_TDX_PW_MCE is present Adrian Hunter
2025-07-03 16:44   ` Kirill A. Shutemov
2025-07-03 17:06   ` Vishal Annapurve
2025-07-04  5:37     ` Adrian Hunter
2025-07-07 23:31       ` Vishal Annapurve
2025-07-04  1:32   ` Xiaoyao Li
2025-07-04  6:44     ` Binbin Wu
2025-07-07  2:09   ` Huang, Kai
2025-07-07  3:16   ` Chao Gao
2025-07-07  4:23     ` Dave Hansen
2025-07-07  7:15       ` Chao Gao
2025-07-07 11:39         ` Huang, Kai
2025-07-07 14:32         ` Dave Hansen
2025-07-07 18:15           ` Edgecombe, Rick P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).