Re: [RFC PATCH v5 16/45] x86/virt/tdx: Add tdx_alloc/free_control_page() helpers
From: Dave Hansen
Date: Tue Feb 10 2026 - 17:19:59 EST
On 2/10/26 14:15, Edgecombe, Rick P wrote:
> I'm wasn't familiar with atomic_dec_and_lock(). I'm guess the atomic
> part doesn't cover both decrementing *and* taking the lock?
Right. Only 1=>0 is under the lock. All other decs are outside the lock.
It doesn't do the atomic and the lock "atomically together" somehow.