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

Re: [Xen-devel] [PATCH 2/2] x86/svm: enable pause filtering threshold



Looks good. 
Reviewed-by: Babu Moger <babu.moger@xxxxxxx>

> -----Original Message-----
> From: Woods, Brian
> Sent: Tuesday, February 20, 2018 6:13 PM
> To: xen-devel@xxxxxxxxxxxxx
> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>; Suthikulpanit, Suravee
> <Suravee.Suthikulpanit@xxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>;
> Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; Woods, Brian
> <Brian.Woods@xxxxxxx>
> Subject: [PATCH 2/2] 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 <brian.woods@xxxxxxx>
> ---
>  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 9f58afc2d8..b6b92365bf 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1694,6 +1694,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 0e6cba5b7b..ebe6f0c751 100644
> --- a/xen/arch/x86/hvm/svm/vmcb.c
> +++ b/xen/arch/x86/hvm/svm/vmcb.c
> @@ -227,6 +227,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;
> --
> 2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.