[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/svm: Introduce svm-types.h



commit a336c18037ece89bceb70696099a5aa03b23c131
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Dec 12 16:28:18 2025 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Dec 15 11:24:26 2025 +0000

    x86/svm: Introduce svm-types.h
    
    In order to reduce the header tangle around xen/sched.h, we need to split
    types away from other declarations.
    
    Introduce a new hvm/svm-types.h to do this, including it from hvm/domain.h 
and
    hvm/vcpu.h, and dropping all other inclusions of svm/vmcb.h and
    svm/nestedhvm.h
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/hvm/svm/emulate.c           |  1 -
 xen/arch/x86/hvm/svm/nestedsvm.c         |  1 -
 xen/arch/x86/hvm/svm/svm.c               |  1 -
 xen/arch/x86/hvm/svm/vmcb.c              |  1 -
 xen/arch/x86/include/asm/hvm/domain.h    |  2 +-
 xen/arch/x86/include/asm/hvm/svm-types.h | 11 +++++++++++
 xen/arch/x86/include/asm/hvm/vcpu.h      |  3 +--
 7 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/emulate.c b/xen/arch/x86/hvm/svm/emulate.c
index be3a710fa5..1f5436c8ea 100644
--- a/xen/arch/x86/hvm/svm/emulate.c
+++ b/xen/arch/x86/hvm/svm/emulate.c
@@ -12,7 +12,6 @@
 #include <asm/hvm/emulate.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/svm.h>
-#include <asm/hvm/svm/vmcb.h>
 
 #include "svm.h"
 #include "vmcb.h"
diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 5718ca7f7f..a63ec61346 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -7,7 +7,6 @@
 
 #include <asm/hvm/support.h>
 #include <asm/hvm/svm.h>
-#include <asm/hvm/svm/vmcb.h>
 #include <asm/hvm/nestedhvm.h>
 #include <asm/paging.h> /* paging_mode_hap */
 #include <asm/event.h> /* for local_event_delivery_(en|dis)able */
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 86a030b02c..1208999454 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -27,7 +27,6 @@
 #include <asm/hvm/nestedhvm.h>
 #include <asm/hvm/support.h>
 #include <asm/hvm/svm.h>
-#include <asm/hvm/svm/vmcb.h>
 #include <asm/i387.h>
 #include <asm/idt.h>
 #include <asm/iocap.h>
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 463e527a7d..cbee10d046 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -16,7 +16,6 @@
 
 #include <asm/guest-msr.h>
 #include <asm/hvm/svm.h>
-#include <asm/hvm/svm/vmcb.h>
 #include <asm/msr-index.h>
 #include <asm/p2m.h>
 #include <asm/spec_ctrl.h>
diff --git a/xen/arch/x86/include/asm/hvm/domain.h 
b/xen/arch/x86/include/asm/hvm/domain.h
index 83be2bd1c2..be1a0d8c5b 100644
--- a/xen/arch/x86/include/asm/hvm/domain.h
+++ b/xen/arch/x86/include/asm/hvm/domain.h
@@ -15,7 +15,7 @@
 
 #include <asm/hvm/io.h>
 #include <asm/hvm/vmx/vmcs.h>
-#include <asm/hvm/svm/vmcb.h>
+#include <asm/hvm/svm-types.h>
 
 #ifdef CONFIG_MEM_SHARING
 struct mem_sharing_domain
diff --git a/xen/arch/x86/include/asm/hvm/svm-types.h 
b/xen/arch/x86/include/asm/hvm/svm-types.h
new file mode 100644
index 0000000000..1c26daa981
--- /dev/null
+++ b/xen/arch/x86/include/asm/hvm/svm-types.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * SVM types needed to form struct domain/vcpu.
+ */
+#ifndef X86_SVM_TYPES_H
+#define X86_SVM_TYPES_H
+
+#include <asm/hvm/svm/vmcb.h>
+#include <asm/hvm/svm/nestedsvm.h>
+
+#endif /* X86_SVM_TYPES_H */
diff --git a/xen/arch/x86/include/asm/hvm/vcpu.h 
b/xen/arch/x86/include/asm/hvm/vcpu.h
index eae9ac5376..836138a4a6 100644
--- a/xen/arch/x86/include/asm/hvm/vcpu.h
+++ b/xen/arch/x86/include/asm/hvm/vcpu.h
@@ -12,8 +12,7 @@
 #include <asm/hvm/vlapic.h>
 #include <asm/hvm/vmx/vmcs.h>
 #include <asm/hvm/vmx/vvmx.h>
-#include <asm/hvm/svm/vmcb.h>
-#include <asm/hvm/svm/nestedsvm.h>
+#include <asm/hvm/svm-types.h>
 #include <asm/mtrr.h>
 #include <public/hvm/ioreq.h>
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.