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

[xen master] x86/svm: opencode SVM_PAUSE{FILTER,THRESH}_INIT



commit 91d4d9506a4e8906253d1280bd5a1f39668fad64
Author:     Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
AuthorDate: Thu Feb 23 12:36:42 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Feb 23 12:36:42 2023 +0100

    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.
    
    Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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 65e35a4f59..cf9ed517d5 100644
--- a/xen/arch/x86/include/asm/hvm/svm/svm.h
+++ b/xen/arch/x86/include/asm/hvm/svm/svm.h
@@ -96,9 +96,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
--
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®.