[PATCH 3/8] x86/include: de-assemblify cpuid.h

Jan Beulich posted 8 patches 10 hours ago
[PATCH 3/8] x86/include: de-assemblify cpuid.h
Posted by Jan Beulich 10 hours ago
There's nothing in that header which assembly files would need. Arrange
for cpufeatureset.h to be included directly by cpufeature.h in that case,
allowing respective guarding to be dropped

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/include/asm/cpufeature.h
+++ b/xen/arch/x86/include/asm/cpufeature.h
@@ -10,7 +10,11 @@
 #include <xen/const.h>
 #include <xen/macros.h>
 
+#ifndef __ASSEMBLY__
 #include <asm/cpuid.h>
+#else
+#include <asm/cpufeatureset.h>
+#endif
 
 #define cpufeat_word(idx)	((idx) / 32)
 #define cpufeat_bit(idx)	((idx) % 32)
--- a/xen/arch/x86/include/asm/cpuid.h
+++ b/xen/arch/x86/include/asm/cpuid.h
@@ -3,7 +3,6 @@
 
 #include <asm/cpufeatureset.h>
 
-#ifndef __ASSEMBLY__
 #include <xen/types.h>
 #include <xen/kernel.h>
 #include <xen/percpu.h>
@@ -50,7 +49,6 @@ struct cpuid_leaf;
 void guest_cpuid(const struct vcpu *v, uint32_t leaf,
                  uint32_t subleaf, struct cpuid_leaf *res);
 
-#endif /* __ASSEMBLY__ */
 #endif /* !__X86_CPUID_H__ */
 
 /*
Re: [PATCH 3/8] x86/include: de-assemblify cpuid.h
Posted by Andrew Cooper 10 hours ago
On 18/11/2025 3:06 pm, Jan Beulich wrote:
> There's nothing in that header which assembly files would need. Arrange
> for cpufeatureset.h to be included directly by cpufeature.h in that case,
> allowing respective guarding to be dropped

Missing full stop.

>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>