Skip to contentSkip to conversation

x86/svm: Rework VMCB_ACCESSORS() to use a plain type name

PATCH In review Andrew Cooper 3 participants 3 messages May 28, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/svm: Rework VMCB_ACCESSORS() to use a plain type name

This avoids having a function call in a typeof() expression.

No functional change.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/include/asm/hvm/svm/vmcb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/include/asm/hvm/svm/vmcb.h +1 -1
index 0396d10b90ba..28f715e37692 100644
@@ -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)

base-commit: 2d93f78bfe25f695d8ffb61d110da9df293ed71b
prerequisite-patch-id: 4f38737ad5ea15b0341664ee1c6b96d0d00b6700

Signature · 1 line
2.30.2