x86/HVM: reduce domain.h include dependencies
authorJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2020 15:11:33 +0000 (16:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2020 15:11:33 +0000 (16:11 +0100)
Drop #include-s not needed by the header itself. Put the ones needed
into whichever other files actually need them.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
19 files changed:
xen/arch/x86/cpu/mcheck/vmce.c
xen/arch/x86/hvm/dm.c
xen/arch/x86/hvm/dom0_build.c
xen/arch/x86/hvm/hpet.c
xen/arch/x86/hvm/hypercall.c
xen/arch/x86/hvm/ioreq.c
xen/arch/x86/hvm/irq.c
xen/arch/x86/hvm/rtc.c
xen/arch/x86/hvm/viridian/private.h
xen/arch/x86/hvm/vpt.c
xen/arch/x86/msr.c
xen/arch/x86/pv/shim.c
xen/arch/x86/traps.c
xen/common/vm_event.c
xen/drivers/char/xen_pv_console.c
xen/include/asm-x86/hvm/domain.h
xen/include/asm-x86/hvm/nestedhvm.h
xen/include/xsm/dummy.h
xen/xsm/flask/hooks.c

index 816ef61ad407ee4599d76f02d25c264d6a9dd4a8..b1df9e9efd663c69d834cc348acbaa9aaa074959 100644 (file)
@@ -28,6 +28,7 @@
 #include <xen/mm.h>
 #include <asm/hvm/save.h>
 #include <asm/processor.h>
+#include <public/hvm/params.h>
 #include <public/sysctl.h>
 #include <asm/system.h>
 #include <asm/msr.h>
index d6d0e8be895003ffcfb4c1fac27da226239ae613..96c5042b756ad2097b9684a546ea57b8d201aa60 100644 (file)
@@ -27,6 +27,8 @@
 
 #include <xsm/xsm.h>
 
+#include <public/hvm/hvm_op.h>
+
 struct dmop_args {
     domid_t domid;
     unsigned int nr_bufs;
index ee1d50acc6e2ddfd0652f07691ee18f9ec01b7f4..2afd44c8a4adc10c53ee03ed18929327bc967c26 100644 (file)
@@ -38,6 +38,7 @@
 #include <public/arch-x86/hvm/start_info.h>
 #include <public/hvm/hvm_info_table.h>
 #include <public/hvm/hvm_vcpu.h>
+#include <public/hvm/params.h>
 
 /*
  * Have the TSS cover the ISA port range, which makes it
index 9fbdc5302bbccd50af03de3fe282875110eef160..ca94e8b4538c092743f081651b2655e5f6c6e05e 100644 (file)
@@ -26,6 +26,7 @@
 #include <xen/event.h>
 #include <xen/trace.h>
 #include <xen/nospec.h>
+#include <public/hvm/params.h>
 
 #define domain_vhpet(x) (&(x)->arch.hvm.pl_time->vhpet)
 #define vcpu_vhpet(x)   (domain_vhpet((x)->domain))
index 33dd2d99d2da35cc42d82c1e99efcd1ae879e847..782197ff8ae659e706284a494ec99bc9429a2b87 100644 (file)
@@ -24,6 +24,9 @@
 
 #include <asm/hvm/support.h>
 
+#include <public/hvm/hvm_op.h>
+#include <public/hvm/params.h>
+
 static long hvm_memory_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
     const struct vcpu *curr = current;
index f8a5c81546a4391af09aacf23d70db8218682d1c..36fbbcf0ea84a50a069bfba709452f70382bd2c0 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/hvm/vmx/vmx.h>
 
 #include <public/hvm/ioreq.h>
+#include <public/hvm/params.h>
 
 static void set_ioreq_server(struct domain *d, unsigned int id,
                              struct hvm_ioreq_server *s)
index dd202aab5a67d501bbf6019d1da2f2711381fac6..b3ee0d913070dbb3f01c7ba7633d39acec67d888 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/hvm/domain.h>
 #include <asm/hvm/support.h>
 #include <asm/msi.h>
+#include <public/hvm/params.h>
 
 bool hvm_domain_use_pirq(const struct domain *d, const struct pirq *pirq)
 {
index ce603b8cf8fc2c357491858afa6064ff97ebc11d..5bbbdc0e0fa9e288d439905f74a5535e4936b0eb 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/hvm/support.h>
 #include <asm/current.h>
 #include <xen/trace.h>
+#include <public/hvm/params.h>
 
 #define USEC_PER_SEC    1000000UL
 #define NS_PER_USEC     1000UL
index 958a2814c25dc8742799c0fed021a10be22326fc..d2fe3c2ea18cbc93ee4676d573a71c416fce0a91 100644 (file)
@@ -4,6 +4,7 @@
 #define X86_HVM_VIRIDIAN_PRIVATE_H
 
 #include <asm/hvm/save.h>
+#include <public/hvm/params.h>
 
 int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val);
 int viridian_synic_rdmsr(const struct vcpu *v, uint32_t idx, uint64_t *val);
index ecd25d7ad48c4c8af994d38b11ae597f6f8f30b7..47f2c2aa646c4ea41305f7a165cd69d695c7790b 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/event.h>
 #include <asm/apic.h>
 #include <asm/mc146818rtc.h>
+#include <public/hvm/params.h>
 
 #define mode_is(d, name) \
     ((d)->arch.hvm.params[HVM_PARAM_TIMER_MODE] == HVMPTM_##name)
index 519222a2b8c44d16d6796078d770ca3c1d755b3e..385ad6d169668e9b661e22c1616776c299949f73 100644 (file)
@@ -28,6 +28,8 @@
 #include <asm/msr.h>
 #include <asm/setup.h>
 
+#include <public/hvm/params.h>
+
 DEFINE_PER_CPU(uint32_t, tsc_aux);
 
 struct msr_policy __read_mostly     raw_msr_policy,
index d86e2de118dde973b8bc7de566fa9dd9936b785a..ed2ece8a8afbd04ab019caedf89e58f2ce849a0e 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/pv/mm.h>
 
 #include <public/arch-x86/cpuid.h>
+#include <public/hvm/params.h>
 
 #include <compat/grant_table.h>
 
index f4f2c13ae93baa83f1064af7dee92b7beaeaa862..e838846c6bdc5fa8f7d0502dfc5c8fed70afbebb 100644 (file)
@@ -76,6 +76,7 @@
 #include <asm/hpet.h>
 #include <asm/vpmu.h>
 #include <public/arch-x86/cpuid.h>
+#include <public/hvm/params.h>
 #include <asm/cpuid.h>
 #include <xsm/xsm.h>
 #include <asm/pv/traps.h>
index 3b18195ebf2a96035ec9f2e3dc21d2434843ea5f..127f2d58f15251fefaa500f6e7a737eacd5fa6f7 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/monitor.h>
 #include <asm/vm_event.h>
 #include <xsm/xsm.h>
+#include <public/hvm/params.h>
 
 /* for public/io/ring.h macros */
 #define xen_mb()   smp_mb()
index 612784b0742836967015e514ed967372a7b924e5..1536bdaf524583feb910a7bcf693c865df692265 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/fixmap.h>
 #include <asm/guest.h>
 
+#include <public/hvm/params.h>
 #include <public/io/console.h>
 
 static struct xencons_interface *cons_ring;
index 8f70ba2b1a7ccd62770435d2be85fd82c4ac1794..624a67d0dddb169e8647f154b5bac6d4b376800b 100644 (file)
 #ifndef __ASM_X86_HVM_DOMAIN_H__
 #define __ASM_X86_HVM_DOMAIN_H__
 
-#include <xen/iommu.h>
-#include <asm/hvm/irq.h>
-#include <asm/hvm/vpt.h>
-#include <asm/hvm/vlapic.h>
-#include <asm/hvm/vioapic.h>
+#include <xen/list.h>
+#include <xen/mm.h>
+#include <xen/radix-tree.h>
+
 #include <asm/hvm/io.h>
-#include <asm/hvm/viridian.h>
 #include <asm/hvm/vmx/vmcs.h>
 #include <asm/hvm/svm/vmcb.h>
-#include <asm/mem_sharing.h>
-#include <public/grant_table.h>
-#include <public/hvm/params.h>
-#include <public/hvm/save.h>
-#include <public/hvm/hvm_op.h>
+
 #include <public/hvm/dm_op.h>
 
 struct hvm_ioreq_page {
index 256fed733a83324fa8264c484b07116ff37c5770..d9784a2e0ba50a30023c6dc122713d40f41e1aae 100644 (file)
@@ -22,6 +22,7 @@
 #include <xen/types.h>         /* for uintNN_t */
 #include <xen/sched.h>         /* for struct vcpu, struct domain */
 #include <asm/hvm/vcpu.h>      /* for vcpu_nestedhvm */
+#include <public/hvm/params.h>
 
 enum nestedhvm_vmexits {
     NESTEDHVM_VMEXIT_ERROR = 0, /* inject VMEXIT w/ invalid VMCB */
index b8e185e6fa9bdd77e4b05c6688e9ce392c74eaac..295dd67c48e8fe946b33cecdea9be6109726a8c8 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <xen/sched.h>
 #include <xsm/xsm.h>
+#include <public/hvm/params.h>
 
 /* Cannot use BUILD_BUG_ON here because the expressions we check are not
  * considered constant at compile time. Instead, rely on constant propagation to
index cf7f25cda208a42cf26a85c2d75d05b9bfcc50fb..8af8602b463761e6898fdb547309391dffecb9b0 100644 (file)
@@ -28,7 +28,7 @@
 #include <public/physdev.h>
 #include <public/platform.h>
 #include <public/version.h>
-
+#include <public/hvm/params.h>
 #include <public/xsm/flask_op.h>
 
 #include <avc.h>