|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/4] x86/svm: cleanup svm.h
Remove the forward declaration of struct vcpu because it is not used.
Move the forward declaration of struct cpu_user_regs just above the
function that needs it (to remind that it will need to be removed
along with the function).
Move the definitions of NPT_PFEC_with_gla and NPT_PFEC_in_gpt in svm.c
because they are used only in this file.
Move the definitions of SVM_PAUSE{FILTER,THRESH}_INIT in vmcb.c because
they are used only in this file.
No functional change intended.
Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
---
xen/arch/x86/hvm/svm/svm.c | 6 ++++++
xen/arch/x86/hvm/svm/vmcb.c | 3 +++
xen/arch/x86/include/asm/hvm/svm/svm.h | 13 +------------
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index f0bc72c313..620c0d2e67 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1634,6 +1634,12 @@ static int cf_check svm_cpu_up(void)
return _svm_cpu_up(false);
}
+/* EXITINFO1 fields on NPT faults */
+#define _NPT_PFEC_with_gla 32
+#define NPT_PFEC_with_gla (1UL<<_NPT_PFEC_with_gla)
+#define _NPT_PFEC_in_gpt 33
+#define NPT_PFEC_in_gpt (1UL<<_NPT_PFEC_in_gpt)
+
static void svm_do_nested_pgfault(struct vcpu *v,
struct cpu_user_regs *regs, uint64_t pfec, paddr_t gpa)
{
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 305d4767e3..151a04b60d 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -30,6 +30,9 @@
#include <asm/hvm/svm/svmdebug.h>
#include <asm/spec_ctrl.h>
+#define SVM_PAUSEFILTER_INIT 4000
+#define SVM_PAUSETHRESH_INIT 1000
+
struct vmcb_struct *alloc_vmcb(void)
{
struct vmcb_struct *vmcb;
diff --git a/xen/arch/x86/include/asm/hvm/svm/svm.h
b/xen/arch/x86/include/asm/hvm/svm/svm.h
index 65e35a4f59..2cd9cea4a0 100644
--- a/xen/arch/x86/include/asm/hvm/svm/svm.h
+++ b/xen/arch/x86/include/asm/hvm/svm/svm.h
@@ -45,10 +45,8 @@ static inline void svm_invlpga(unsigned long linear,
uint32_t asid)
"a" (linear), "c" (asid));
}
-struct cpu_user_regs;
-struct vcpu;
-
unsigned long *svm_msrbit(unsigned long *msr_bitmap, uint32_t msr);
+struct cpu_user_regs;
void __update_guest_eip(struct cpu_user_regs *regs, unsigned int inst_len);
/*
@@ -96,17 +94,8 @@ extern u32 svm_feature_flags;
#define cpu_has_svm_sss cpu_has_svm_feature(SVM_FEATURE_SSS)
#define cpu_has_svm_spec_ctrl cpu_has_svm_feature(SVM_FEATURE_SPEC_CTRL)
-#define SVM_PAUSEFILTER_INIT 4000
-#define SVM_PAUSETHRESH_INIT 1000
-
/* TSC rate */
#define DEFAULT_TSC_RATIO 0x0000000100000000ULL
#define TSC_RATIO_RSVD_BITS 0xffffff0000000000ULL
-/* EXITINFO1 fields on NPT faults */
-#define _NPT_PFEC_with_gla 32
-#define NPT_PFEC_with_gla (1UL<<_NPT_PFEC_with_gla)
-#define _NPT_PFEC_in_gpt 33
-#define NPT_PFEC_in_gpt (1UL<<_NPT_PFEC_in_gpt)
-
#endif /* __ASM_X86_HVM_SVM_H__ */
--
2.37.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |