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

Re: [Xen-devel] [PATCH 1/3] x86/HVM: introduce hvm_get_cpl() and respective hook



On 06/12/16 11:43, Jan Beulich wrote:
> @@ -921,6 +921,26 @@ static void vmx_ctxt_switch_to(struct vc
>  }
>  
>  
> +unsigned int vmx_get_cpl(void)
> +{
> +    unsigned long attr;
> +
> +    __vmread(GUEST_SS_AR_BYTES, &attr);
> +
> +    return (attr >> 5) & 3;
> +}
> +
> +static unsigned int _vmx_get_cpl(struct vcpu *v)
> +{
> +    unsigned int cpl;
> +
> +    vmx_vmcs_enter(v);
> +    cpl = vmx_get_cpl();
> +    vmx_vmcs_exit(v);
> +
> +    return cpl;
> +}

Our ususal convention for functions with leading underscores would have
these the other way around.

As an alternative, how about vmx_hvmfunc_get_cpl() ? It is never called
directly.

Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

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

 


Rackspace

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