Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1740425 > unrolled thread
| Started by | Wanpeng Li <kernellwp@gmail.com> |
|---|---|
| First post | 2017-09-27 08:40 +0200 |
| Last post | 2017-09-27 20:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support Wanpeng Li <kernellwp@gmail.com> - 2017-09-27 08:40 +0200
Re: [PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2017-09-27 20:00 +0200
| From | Wanpeng Li <kernellwp@gmail.com> |
|---|---|
| Date | 2017-09-27 08:40 +0200 |
| Subject | [PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support |
| Message-ID | <uueaJ-79N-3@gated-at.bofh.it> |
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
shows the default value on L1 hypervsior. This patch fixes it by clearing all the
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>
---
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
[toc] | [next] | [standalone]
| From | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
|---|---|
| Date | 2017-09-27 20:00 +0200 |
| Subject | Re: [PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support |
| Message-ID | <uuoMN-6fs-5@gated-at.bofh.it> |
| In reply to | #1740425 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web