]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: VMX: Add a wrapper around ROL16() to get a vmcs12 from a field encoding
authorSean Christopherson <seanjc@google.com>
Thu, 15 Jan 2026 17:34:25 +0000 (09:34 -0800)
committerSean Christopherson <seanjc@google.com>
Fri, 16 Jan 2026 15:48:00 +0000 (07:48 -0800)
commitc68feb605cc47431b3d86e6c2fe4f8342ebc87eb
tree0c2c845f73299fa90eb40854bbab359ac43c958f
parent26304e0e694f4cacc30bcf757663f26533351fbd
KVM: VMX: Add a wrapper around ROL16() to get a vmcs12 from a field encoding

Add a wrapper macro, ENC_TO_VMCS12_IDX(), to get a vmcs12 index given a
field encoding in anticipation of adding a macro to get from a vmcs12 index
back to the field encoding.  And because open coding ROL16(n, 6) everywhere
is gross.

No functional change intended.

Suggested-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://patch.msgid.link/20260115173427.716021-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/hyperv_evmcs.c
arch/x86/kvm/vmx/hyperv_evmcs.h
arch/x86/kvm/vmx/vmcs.h
arch/x86/kvm/vmx/vmcs12.c
arch/x86/kvm/vmx/vmcs12.h