[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] VMX: no open-coding in vmx_get_cpl()
commit 23cd1207e7f6ee3e51fb42e11dba8d7cdb28e1e5 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Apr 25 16:38:01 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Apr 25 16:38:01 2024 +0200 VMX: no open-coding in vmx_get_cpl() Neither X86_SEG_AR_DPL nor MASK_EXTR() should really be avoided here, using literal number instead. No difference in generated code (with gcc13 at least). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/hvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 0935762378..5f67a48592 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -1192,7 +1192,7 @@ unsigned int vmx_get_cpl(void) __vmread(GUEST_SS_AR_BYTES, &attr); - return (attr >> 5) & 3; + return MASK_EXTR(attr, X86_SEG_AR_DPL); } static unsigned int cf_check _vmx_get_cpl(struct vcpu *v) -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |