|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 2/9] x86/svm: opencode SVM_PAUSE{FILTER,THRESH}_INIT
Delete the macros SVM_PAUSE{FILTER,THRESH}_INIT from svm.h and opencode
their values, since they are used in a single place and using macros is
just unnecessary obfuscation.
Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
---
Changes in v2:
- opencode instead of moving the macros in vmcs.c, suggested by Andrew
xen/arch/x86/hvm/svm/vmcb.c | 4 ++--
xen/arch/x86/include/asm/hvm/svm/svm.h | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 305d4767e3..ba93375e87 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -169,11 +169,11 @@ static int construct_vmcb(struct vcpu *v)
if ( cpu_has_pause_filter )
{
- vmcb->_pause_filter_count = SVM_PAUSEFILTER_INIT;
+ vmcb->_pause_filter_count = 4000;
vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_PAUSE;
if ( cpu_has_pause_thresh )
- vmcb->_pause_filter_thresh = SVM_PAUSETHRESH_INIT;
+ vmcb->_pause_filter_thresh = 1000;
}
/*
diff --git a/xen/arch/x86/include/asm/hvm/svm/svm.h
b/xen/arch/x86/include/asm/hvm/svm/svm.h
index fa39d4d76a..c62d0caa32 100644
--- a/xen/arch/x86/include/asm/hvm/svm/svm.h
+++ b/xen/arch/x86/include/asm/hvm/svm/svm.h
@@ -95,9 +95,6 @@ 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
--
2.37.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |