Re: [PATCH V4 1/2] x86/tdx: Eliminate duplicate code in tdx_clear_page()

From: Edgecombe, Rick P
Date: Wed Jul 23 2025 - 10:45:50 EST


On Wed, 2025-07-23 at 17:37 +0300, Adrian Hunter wrote:
> > The latter seems better to me for the sake of less churn.
>
> Why make tdx_quirk_reset_page() and tdx_quirk_reset_paddr() follow
> different rules.
>
> How about this:
>
> From: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Subject: [PATCH] x86/tdx: Tidy reset_pamt functions
>
> Rename reset_pamt functions to contain "quirk" to reflect the new
> functionality, and remove the now misleading comment.

This looks like the "former" option. Churn is not too bad, and it has the
benefit of clear code vs long comment. I'm ok either way. But it needs to go
cleanup first in the patch order.

The log should explain why it's ok to change now, with respect to the reasoning
in the comment that is being removed.