Re: [PATCH v10 04/11] x86/virt/tdx: Allocate refcounts for Dynamic PAMT memory

From: Dave Hansen

Date: Thu Sep 03 2026 - 11:48:26 EST


On 9/2/26 18:51, Rick Edgecombe wrote:
> @@ -2159,7 +2210,7 @@ static void __tdx_pamt_put(kvm_pfn_t pfn)
> * This function is currently only safe to call once. And not safe to call
> * if __tdx_pamt_get() is called before or after.
> */
> -static struct page * __maybe_unused __tdx_alloc_control_page(void)
> +static __maybe_unused struct page *__tdx_alloc_control_page(void)
> {
> struct page *page;
>
> @@ -2184,7 +2235,7 @@ static struct page * __maybe_unused __tdx_alloc_control_page(void)
> * it, and no other pages in the aligned 2MB physical region will
> * still need the backing.
> */
> -static void __maybe_unused __tdx_free_control_page(struct page *page)
> +static __maybe_unused void __tdx_free_control_page(struct page *page)
> {

What's with all the __maybe_unused order flipping?