]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/svm: enable pause filtering threshold
authorBrian Woods <brian.woods@amd.com>
Fri, 23 Feb 2018 10:04:48 +0000 (11:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Feb 2018 10:04:48 +0000 (11:04 +0100)
If available, enable the pause filtering threshold feature.  See the
previous commit for more information.

Signed-off-by: Brian Woods <brian.woods@amd.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/svm/vmcb.c

index 64d2955b2225178994f4ad1409dfb9cd57e1575c..1bc95da12cd87230aaaced3aba9fa8145c3eed2e 100644 (file)
@@ -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
 
index 997e7597e0c6c9b8b0f45cfc15ec2002e01cc35c..ae60d8dc1c735c025183a6b2ce2fba048f76677d 100644 (file)
@@ -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;