From: Brian Woods Date: Fri, 23 Feb 2018 10:04:48 +0000 (+0100) Subject: x86/svm: enable pause filtering threshold X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~545 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=28e4db994903e8c10cb9bce3c133b4f3856c981a;p=xen.git 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 Reviewed-by: Babu Moger Reviewed-by: Boris Ostrovsky --- diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 64d2955b22..1bc95da12c 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 997e7597e0..ae60d8dc1c 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;