KVM: VMX: Use the correct field var when clearing VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL
diff mbox series

Message ID 20190114201202.20644-1-sean.j.christopherson@intel.com
State New
Headers show
Series
  • KVM: VMX: Use the correct field var when clearing VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL
Related show

Commit Message

Sean Christopherson Jan. 14, 2019, 8:12 p.m. UTC
Fix a recently introduced bug that results in the wrong VMCS control
field being updated when applying a IA32_PERF_GLOBAL_CTRL errata.

Fixes: c73da3fcab43 ("KVM: VMX: Properly handle dynamic VM Entry/Exit controls")
Reported-and-tested-by: Harald Arnesen <harald@skogtun.org>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Harald Arnesen Jan. 20, 2019, 8:15 p.m. UTC | #1
Sean Christopherson [14.01.2019 21:12]:

> Fix a recently introduced bug that results in the wrong VMCS control
> field being updated when applying a IA32_PERF_GLOBAL_CTRL errata.
> 
> Fixes: c73da3fcab43 ("KVM: VMX: Properly handle dynamic VM Entry/Exit controls")
> Reported-and-tested-by: Harald Arnesen <harald@skogtun.org>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Will there be a pull request before 5.0-rc3?
Harald Arnesen Jan. 23, 2019, 9:48 p.m. UTC | #2
Sean Christopherson [14/01/2019 21.12]:

> Fix a recently introduced bug that results in the wrong VMCS control
> field being updated when applying a IA32_PERF_GLOBAL_CTRL errata.
> 
> Fixes: c73da3fcab43 ("KVM: VMX: Properly handle dynamic VM Entry/Exit controls")
> Reported-and-tested-by: Harald Arnesen <harald@skogtun.org>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  arch/x86/kvm/vmx/vmx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index f6915f10e584..0762fcab8fc9 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -2344,7 +2344,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf,
>  		case 37: /* AAT100 */
>  		case 44: /* BC86,AAY89,BD102 */
>  		case 46: /* BA97 */
> -			_vmexit_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
> +			_vmentry_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
>  			_vmexit_control &= ~VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL;
>  			pr_warn_once("kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL "
>  					"does not work properly. Using workaround\n");

Has this slipped through the floorboards?
Paolo Bonzini Jan. 25, 2019, 5:52 p.m. UTC | #3
On 14/01/19 21:12, Sean Christopherson wrote:
> Fix a recently introduced bug that results in the wrong VMCS control
> field being updated when applying a IA32_PERF_GLOBAL_CTRL errata.
> 
> Fixes: c73da3fcab43 ("KVM: VMX: Properly handle dynamic VM Entry/Exit controls")
> Reported-and-tested-by: Harald Arnesen <harald@skogtun.org>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  arch/x86/kvm/vmx/vmx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index f6915f10e584..0762fcab8fc9 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -2344,7 +2344,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf,
>  		case 37: /* AAT100 */
>  		case 44: /* BC86,AAY89,BD102 */
>  		case 46: /* BA97 */
> -			_vmexit_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
> +			_vmentry_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
>  			_vmexit_control &= ~VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL;
>  			pr_warn_once("kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL "
>  					"does not work properly. Using workaround\n");
> 

Queued, thanks.

Paolo
Harald Arnesen Jan. 27, 2019, 6:34 p.m. UTC | #4
Paolo Bonzini [25.01.2019 18:52]:

> On 14/01/19 21:12, Sean Christopherson wrote:
>> Fix a recently introduced bug that results in the wrong VMCS control
>> field being updated when applying a IA32_PERF_GLOBAL_CTRL errata.
>> 
>> Fixes: c73da3fcab43 ("KVM: VMX: Properly handle dynamic VM Entry/Exit controls")
>> Reported-and-tested-by: Harald Arnesen <harald@skogtun.org>
>> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

I just want to confirm that everything works as expected now.

Patch
diff mbox series

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index f6915f10e584..0762fcab8fc9 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2344,7 +2344,7 @@  static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf,
 		case 37: /* AAT100 */
 		case 44: /* BC86,AAY89,BD102 */
 		case 46: /* BA97 */
-			_vmexit_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
+			_vmentry_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
 			_vmexit_control &= ~VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL;
 			pr_warn_once("kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL "
 					"does not work properly. Using workaround\n");