On Sun, Aug 12, 2012 at 04:22:59PM +0300, Avi Kivity wrote:
> On 08/12/2012 04:12 PM, Gleb Natapov wrote:
> > MSR_IA32_DEBUGCTLMSR is zeroed on VMEXIT. Restore it to the correct
> > value.
> >
> > @@ -6222,6 +6222,7 @@ static void atomic_switch_perf_msrs(struct vcpu_vmx
> > *vmx)
> > static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
> > {
> > struct vcpu_vmx *vmx = to_vmx(vcpu);
> > + unsigned long debugctlmsr;
> >
> > if (is_guest_mode(vcpu) && !vmx->nested.nested_run_pending) {
> > struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
> > @@ -6261,6 +6262,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu
> > *vcpu)
> > vmx_set_interrupt_shadow(vcpu, 0);
> >
> > atomic_switch_perf_msrs(vmx);
> > + debugctlmsr = get_debugctlmsr();
>
> How expensive is this? We may want a follow-on patch to cache it in a
> per-cpu variable.
>
I have patches ready. I couldn't measure any overhead of the
rdmsr(MSR_IA32_DEBUGCTLMSR).
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html