[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] VMX: fix DebugCtl MSR clearing



> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Tuesday, August 12, 2014 2:14 AM
> 
> The previous shortcut was wrong, as it bypassed the necessary vmwrite:
> All we really want to avoid if the guest writes zero is to add the MSR
> to the host-load list.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> 
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -2246,8 +2246,6 @@ static int vmx_msr_write_intercept(unsig
>          int i, rc = 0;
>          uint64_t supported = IA32_DEBUGCTLMSR_LBR |
> IA32_DEBUGCTLMSR_BTF;
> 
> -        if ( !msr_content )
> -            break;
>          if ( msr_content & ~supported )
>          {
>              /* Perhaps some other bits are supported in vpmu. */
> @@ -2267,12 +2265,10 @@ static int vmx_msr_write_intercept(unsig
>          }
> 
>          if ( (rc < 0) ||
> -             (vmx_add_host_load_msr(msr) < 0) )
> +             (msr_content && (vmx_add_host_load_msr(msr) < 0)) )
>              hvm_inject_hw_exception(TRAP_machine_check, 0);
>          else
> -        {
>              __vmwrite(GUEST_IA32_DEBUGCTL, msr_content);
> -        }
> 
>          break;
>      }
> 
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.