diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-21 04:36:37 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-03-11 05:46:03 -0400 |
commit | d16c293e4ecbddedfc1d64095ce56f0569adc12b (patch) | |
tree | d0a997e495eb90b26f7ff67302959423d995d8ce /arch | |
parent | 81908bf44340eb5ebc9969f67e6c8be0c92f2857 (diff) |
KVM: nVMX: Allow nested guests to run with dirty debug registers
When preparing the VMCS02, the CPU-based execution controls is computed
by vmx_exec_control. Turn off DR access exits there, too, if the
KVM_DEBUGREG_WONT_EXIT bit is set in switch_db_regs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a9940ec9e215..f4e5aeda5edf 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -4242,6 +4242,10 @@ static u32 vmx_pin_based_exec_ctrl(struct vcpu_vmx *vmx) | |||
4242 | static u32 vmx_exec_control(struct vcpu_vmx *vmx) | 4242 | static u32 vmx_exec_control(struct vcpu_vmx *vmx) |
4243 | { | 4243 | { |
4244 | u32 exec_control = vmcs_config.cpu_based_exec_ctrl; | 4244 | u32 exec_control = vmcs_config.cpu_based_exec_ctrl; |
4245 | |||
4246 | if (vmx->vcpu.arch.switch_db_regs & KVM_DEBUGREG_WONT_EXIT) | ||
4247 | exec_control &= ~CPU_BASED_MOV_DR_EXITING; | ||
4248 | |||
4245 | if (!vm_need_tpr_shadow(vmx->vcpu.kvm)) { | 4249 | if (!vm_need_tpr_shadow(vmx->vcpu.kvm)) { |
4246 | exec_control &= ~CPU_BASED_TPR_SHADOW; | 4250 | exec_control &= ~CPU_BASED_TPR_SHADOW; |
4247 | #ifdef CONFIG_X86_64 | 4251 | #ifdef CONFIG_X86_64 |