Re: [PATCH v6 06/11] x86/virt/tdx: Optimize tdx_pamt_get/put()

From: Edgecombe, Rick P

Date: Tue May 26 2026 - 13:04:02 EST


On Tue, 2026-05-26 at 16:57 +0800, Chao Gao wrote:
> > - scoped_guard(spinlock, &pamt_lock) {
>
> This converts the scoped_guard() added by the previous patch to
> explicit lock/unlock and goto. It would reduce code churn if the
> previous patch used that form directly.

Yea, it's a good point. I actually debated doing it, but decided not to because
the scoped version is cleaner for the non-optimized version. But for
reviewability, never doing the scoped version is probably better.