>>> On 06.12.16 at 14:49, <andrew.coop...@citrix.com> wrote: > 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.
Our usual convention doesn't fit here: The static function is the only one allowed to have an underscore prefix. > As an alternative, how about vmx_hvmfunc_get_cpl() ? It is never called > directly. I don't like this. If anything, vmx_do_get_cpl(), albeit it's only slightly better imo. > Otherwise, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> Let me know if you can live with the existing naming. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel