mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Wanpeng Li" <wanpeng.li@hotmail.com>
Subject: Re: [PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support
Date: Wed, 27 Sep 2017 13:54:08 -0400	[thread overview]
Message-ID: <20170927175408.GB2598@char.us.oracle.com> (raw)
In-Reply-To: <1506494062-25533-2-git-send-email-wanpeng.li@hotmail.com>

On Tue, Sep 26, 2017 at 11:34:22PM -0700, Wanpeng Li wrote:
> From: Wanpeng Li <wanpeng.li@hotmail.com>
> 
> PLE_Window: Software can configure this field as an upper bound on the amount of time
> a guest is allowed to execute in a PAUSE LOOP.
> 
> KVM doesn't expose the PLE capability to the L1 hypervsior, however, ple_window still

s/hypervsior/hypervisor/
> shows the default value on L1 hypervsior. This patch fixes it by clearing all the

Ditto here.
> PLE related module parameter if there is no PLE capability.
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Radim Krčmář <rkrcmar@redhat.com>
> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> ---
>  arch/x86/kvm/vmx.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index c83d28b..4d4f9b4 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6781,8 +6781,13 @@ static __init int hardware_setup(void)
>  	if (enable_ept && !cpu_has_vmx_ept_2m_page())
>  		kvm_disable_largepages();
>  
> -	if (!cpu_has_vmx_ple())
> +	if (!cpu_has_vmx_ple()) {
>  		ple_gap = 0;
> +		ple_window = 0;
> +		ple_window_grow = 0;
> +		ple_window_max = 0;
> +		ple_window_shrink = 0;
> +	}
>  
>  	if (!cpu_has_vmx_apicv()) {
>  		enable_apicv = 0;
> -- 
> 2.7.4
> 

      reply	other threads:[~2017-09-27 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  6:34 [PATCH 1/2] KVM: LAPIC: Don't silently accept bad vectors Wanpeng Li
2017-09-27  6:34 ` [PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support Wanpeng Li
2017-09-27 17:54   ` Konrad Rzeszutek Wilk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170927175408.GB2598@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®