[xen master] x86/svm: enable pause filtering threshold

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] x86/svm: enable pause filtering threshold

patchbot
commit 28e4db994903e8c10cb9bce3c133b4f3856c981a
Author:     Brian Woods <[hidden email]>
AuthorDate: Fri Feb 23 11:04:48 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Fri Feb 23 11:04:48 2018 +0100

    x86/svm: enable pause filtering threshold
   
    If available, enable the pause filtering threshold feature.  See the
    previous commit for more information.
   
    Signed-off-by: Brian Woods <[hidden email]>
    Reviewed-by: Babu Moger <[hidden email]>
    Reviewed-by: Boris Ostrovsky <[hidden email]>
---
 xen/arch/x86/hvm/svm/svm.c  | 1 +
 xen/arch/x86/hvm/svm/vmcb.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 64d2955..1bc95da 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1700,6 +1700,7 @@ const struct hvm_function_table * __init start_svm(void)
     P(cpu_has_svm_vloadsave, "Virtual VMLOAD/VMSAVE");
     P(cpu_has_svm_vgif, "Virtual GIF");
     P(cpu_has_pause_filter, "Pause-Intercept Filter");
+    P(cpu_has_pause_thresh, "Pause-Intercept Filter Threshold");
     P(cpu_has_tsc_ratio, "TSC Rate MSR");
 #undef P
 
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 997e759..ae60d8d 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -210,6 +210,9 @@ static int construct_vmcb(struct vcpu *v)
     {
         vmcb->_pause_filter_count = SVM_PAUSEFILTER_INIT;
         vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_PAUSE;
+
+        if ( cpu_has_pause_thresh )
+            vmcb->_pause_filter_thresh = SVM_PAUSETHRESH_INIT;
     }
 
     vmcb->cleanbits.bytes = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog