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

Re: [Xen-devel] [PATCH v10 06/20] vmx: Merge MSR management routines



>>> On 04.09.14 at 05:41, <boris.ostrovsky@xxxxxxxxxx> wrote:
> vmx_add_host_load_msr() and vmx_add_guest_msr() share fair amount of code. 
> Merge
> them to simplify code maintenance.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>

Considering the re-work, is this really valid?

> -int vmx_add_guest_msr(u32 msr)
> +int vmx_add_msr(u32 msr, u8 type)

Why u8?

> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -2263,12 +2263,12 @@ static int vmx_msr_write_intercept(unsigned int msr, 
> uint64_t msr_content)
>  
>              for ( ; (rc == 0) && lbr->count; lbr++ )
>                  for ( i = 0; (rc == 0) && (i < lbr->count); i++ )
> -                    if ( (rc = vmx_add_guest_msr(lbr->base + i)) == 0 )
> +                    if ( (rc = vmx_add_msr(lbr->base + i, VMX_GUEST_MSR)) == 
> 0 )

Perhaps better keep the old functions as inline wrappers?

Jan


_______________________________________________
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®.