From: Andrew Cooper Date: Tue, 28 May 2024 15:29:11 +0000 (+0100) Subject: x86/svm: Rework VMCB_ACCESSORS() to use a plain type name X-Git-Tag: 4.19.0-rc1~120 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d27c2835e0005200d464b57156c76455d46f74bb;p=xen.git x86/svm: Rework VMCB_ACCESSORS() to use a plain type name This avoids having a function call in a typeof() expression. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Release-Acked-by: Oleksii Kurochko --- diff --git a/xen/arch/x86/include/asm/hvm/svm/vmcb.h b/xen/arch/x86/include/asm/hvm/svm/vmcb.h index 0396d10b90..28f715e376 100644 --- a/xen/arch/x86/include/asm/hvm/svm/vmcb.h +++ b/xen/arch/x86/include/asm/hvm/svm/vmcb.h @@ -630,7 +630,7 @@ vmcb_get_ ## name(const struct vmcb_struct *vmcb) \ } #define VMCB_ACCESSORS(name, cleanbit) \ - VMCB_ACCESSORS_(name, typeof(alloc_vmcb()->_ ## name), cleanbit) + VMCB_ACCESSORS_(name, typeof(((struct vmcb_struct){})._ ## name), cleanbit) VMCB_ACCESSORS(cr_intercepts, intercepts) VMCB_ACCESSORS(dr_intercepts, intercepts)