Skip to content

Commit efc8313

Browse files
Chenyi Qiangbonzini
authored andcommitted
KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled
KVM supports the nested VM_{EXIT, ENTRY}_LOAD_IA32_PERF_GLOBAL_CTRL and VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS, but they are not exposed by the system ioctl KVM_GET_MSR. Add them to the setup of nested VMX controls MSR. Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com> Message-Id: <20200828085622.8365-2-chenyi.qiang@intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent d5cd6f3 commit efc8313

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎arch/x86/kvm/vmx/nested.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6318,7 +6318,8 @@ void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps)
63186318
#ifdef CONFIG_X86_64
63196319
VM_EXIT_HOST_ADDR_SPACE_SIZE |
63206320
#endif
6321-
VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
6321+
VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT |
6322+
VM_EXIT_CLEAR_BNDCFGS | VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL;
63226323
msrs->exit_ctls_high |=
63236324
VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
63246325
VM_EXIT_LOAD_IA32_EFER | VM_EXIT_SAVE_IA32_EFER |
@@ -6337,7 +6338,8 @@ void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps)
63376338
#ifdef CONFIG_X86_64
63386339
VM_ENTRY_IA32E_MODE |
63396340
#endif
6340-
VM_ENTRY_LOAD_IA32_PAT;
6341+
VM_ENTRY_LOAD_IA32_PAT | VM_ENTRY_LOAD_BNDCFGS |
6342+
VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
63416343
msrs->entry_ctls_high |=
63426344
(VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR | VM_ENTRY_LOAD_IA32_EFER);
63436345

0 commit comments

Comments
 (0)