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.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel