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

Andrew Cooper posted 1 patch 1 year, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240528153204.1350919-1-andrew.cooper3@citrix.com
xen/arch/x86/include/asm/hvm/svm/vmcb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] x86/svm: Rework VMCB_ACCESSORS() to use a plain type name
Posted by Andrew Cooper 1 year, 5 months ago
This avoids having a function call in a typeof() expression.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/include/asm/hvm/svm/vmcb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/hvm/svm/vmcb.h b/xen/arch/x86/include/asm/hvm/svm/vmcb.h
index 0396d10b90ba..28f715e37692 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)

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


Re: [PATCH] x86/svm: Rework VMCB_ACCESSORS() to use a plain type name
Posted by Jan Beulich 1 year, 5 months ago
On 28.05.2024 17:32, Andrew Cooper wrote:
> This avoids having a function call in a typeof() expression.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
Re: [PATCH] x86/svm: Rework VMCB_ACCESSORS() to use a plain type name
Posted by Oleksii K. 1 year, 5 months ago
On Tue, 2024-05-28 at 17:37 +0200, Jan Beulich wrote:
> On 28.05.2024 17:32, Andrew Cooper wrote:
> > This avoids having a function call in a typeof() expression.
> > 
> > No functional change.
> > 
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

~ Oleksii