Re: [PATCH 2/2] x86/virt/tdx: Use PFN directly for unmapping guest private memory
From: Paolo Bonzini
Date: Sat Apr 04 2026 - 02:39:43 EST
On 3/19/26 09:56, Yan Zhao wrote:
On Thu, Mar 19, 2026 at 04:56:10PM +0800, Xiaoyao Li wrote:
So why not considering option 2?I don't think it's necessary. But if we have to export an extra API, IMHO,
2. keep tdx_quirk_reset_page() as-is for the cases of
tdx_reclaim_page() and tdx_reclaim_td_control_pages() that have the
struct page. But only change tdx_sept_remove_private_spte() to use
tdx_quirk_reset_paddr() directly.
It will need export tdx_quirk_reset_paddr() for KVM. I think it will be OK?
tdx_quirk_reset_pfn() is better than tdx_quirk_reset_paddr(). Otherwise,
why not only expose tdx_quirk_reset_paddr()?
That works for me, it seems the cleanest.
Paolo