> From: Sergey Dyasli [mailto:sergey.dya...@citrix.com]
> Sent: Monday, June 26, 2017 6:45 PM
> 
> 1. Remove RDMSRs of VMX MSRs since all values are already available in
>    raw_vmx_msr_policy.
> 2. Replace bit operations involving VMX bitmasks with accessing VMX
>    features by name and using vmx_msr_available() where appropriate.
> 
> Signed-off-by: Sergey Dyasli <sergey.dya...@citrix.com>
> ---
>  xen/arch/x86/hvm/vmx/vmcs.c | 56 +++++++++++++++++++++-------------------
> -----
>  1 file changed, 26 insertions(+), 30 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
> index 00fbc0ccb8..dbf6eb7433 100644
> --- a/xen/arch/x86/hvm/vmx/vmcs.c
> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
> @@ -227,7 +227,8 @@ static u32 adjust_vmx_controls(
>  {
>      u32 vmx_msr_low, vmx_msr_high, ctl = ctl_min | ctl_opt;
> 
> -    rdmsr(msr, vmx_msr_low, vmx_msr_high);
> +    vmx_msr_low = raw_vmx_msr_policy.msr[msr - MSR_IA32_VMX_BASIC];
> +    vmx_msr_high = raw_vmx_msr_policy.msr[msr -
> MSR_IA32_VMX_BASIC] >> 32;

also need check vmx_msr_available() here?

Thanks
Kevin

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

Reply via email to