Re: [PATCH v6 06/11] x86/virt/tdx: Optimize tdx_pamt_get/put()
From: Dave Hansen
Date: Fri Jun 05 2026 - 12:32:29 EST
On 6/5/26 04:42, Kiryl Shutsemau wrote:
>>> I don't see a reason why we can't keep the scoped_guard() on get side.
>> One additional reason to drop scoped_guard() is that it mixes cleanup helpers
>> with goto, which is discouraged. See [*]
>>
>> :Lastly, given that the benefit of cleanup helpers is removal of “goto”, and
>> :that the “goto” statement can jump between scopes, the expectation is that
>> :usage of “goto” and cleanup helpers is never mixed in the same function.
> Fair enough.
>
> But it can also be address if we free the PAMT page array with the guard
> too :P
How important is this patch? I see "Optimize" but I read "Optional".
If we're arguing about it, maybe we should just kick it out and focus on
the more important bits.