[PATCH 16/16] x86/cpuid: Drop the include of public/sysctl.h

Andrew Cooper posted 16 patches 1 week, 4 days ago
[PATCH 16/16] x86/cpuid: Drop the include of public/sysctl.h
Posted by Andrew Cooper 1 week, 4 days ago
Following the removal of XEN_SYSCTL_get_cpu_levelling_caps, asm/cpuid.h
doesn't need to include public/sysctl.h, but several other header files were
picking up their includes transitively through asm/cpuid.h.  Untangle them.

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>
CC: Julian Vetter <julian.vetter@vates.tech>
CC: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/x86/include/asm/cpuid.h      | 2 --
 xen/arch/x86/include/asm/hvm/hvm.h    | 2 ++
 xen/arch/x86/include/asm/hvm/vlapic.h | 2 ++
 xen/arch/x86/include/asm/hvm/vpt.h    | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/cpuid.h b/xen/arch/x86/include/asm/cpuid.h
index c7ee1d54bc7e..774cfdf86894 100644
--- a/xen/arch/x86/include/asm/cpuid.h
+++ b/xen/arch/x86/include/asm/cpuid.h
@@ -7,8 +7,6 @@
 #include <xen/kernel.h>
 #include <xen/percpu.h>
 
-#include <public/sysctl.h>
-
 extern const uint32_t known_features[FSCAPINTS];
 
 /*
diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h
index af042ae858af..ede685d030bd 100644
--- a/xen/arch/x86/include/asm/hvm/hvm.h
+++ b/xen/arch/x86/include/asm/hvm/hvm.h
@@ -19,6 +19,8 @@
 #include <asm/x86_emulate.h>
 
 struct pirq; /* needed by pi_update_irte */
+struct hvm_hw_cpu;
+struct xen_domctl_createdomain;
 
 #ifdef CONFIG_HVM_FEP
 /* Permit use of the Forced Emulation Prefix in HVM guests */
diff --git a/xen/arch/x86/include/asm/hvm/vlapic.h b/xen/arch/x86/include/asm/hvm/vlapic.h
index c38855119836..f442dec3d975 100644
--- a/xen/arch/x86/include/asm/hvm/vlapic.h
+++ b/xen/arch/x86/include/asm/hvm/vlapic.h
@@ -12,6 +12,8 @@
 #include <xen/tasklet.h>
 #include <asm/hvm/vpt.h>
 
+#include <public/hvm/save.h>
+
 #define vcpu_vlapic(x)   (&(x)->arch.hvm.vlapic)
 #define vlapic_vcpu(x)   (container_of((x), struct vcpu, arch.hvm.vlapic))
 #define const_vlapic_vcpu(x) (container_of((x), const struct vcpu, \
diff --git a/xen/arch/x86/include/asm/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/vpt.h
index 0b92b286252d..24f0918280cd 100644
--- a/xen/arch/x86/include/asm/hvm/vpt.h
+++ b/xen/arch/x86/include/asm/hvm/vpt.h
@@ -12,6 +12,8 @@
 #include <xen/list.h>
 #include <xen/rwlock.h>
 
+#include <public/hvm/save.h>
+
 /*
  * Abstract layer of periodic time, one short time.
  */
-- 
2.39.5


Re: [PATCH 16/16] x86/cpuid: Drop the include of public/sysctl.h
Posted by Jan Beulich 1 week, 3 days ago
On 26.01.2026 18:53, Andrew Cooper wrote:
> Following the removal of XEN_SYSCTL_get_cpu_levelling_caps, asm/cpuid.h
> doesn't need to include public/sysctl.h, but several other header files were
> picking up their includes transitively through asm/cpuid.h.  Untangle them.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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