x86/hvm: Rework nested hap functions to reduce parameters
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 Nov 2021 17:05:09 +0000 (17:05 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Jan 2022 15:19:43 +0000 (15:19 +0000)
commitddf820e1d6e82051be95eeb30a570426423e4f9f
tree69509065bfb7e706417b7157cc9f4a6b4bc2c8ea
parent32a971bfa6760d8fb260d9d721c5ecdd894deafd
x86/hvm: Rework nested hap functions to reduce parameters

Most functions in this call chain have 8 parameters, meaning that the final
two booleans are spilled to the stack for calls.

First, delete nestedhap_walk_L1_p2m and introduce nhvm_hap_walk_L1_p2m() as a
thin wrapper around hvm_funcs, just like all the other nhvm_*() hooks.  This
involves including xen/mm.h as the forward declaration of struct npfec is no
longer enough.

Next, replace the triple of booleans with struct npfec, which contains the
same information in the bottom 3 bits.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/nestedsvm.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/arch/x86/include/asm/hvm/hvm.h
xen/arch/x86/include/asm/hvm/nestedhvm.h
xen/arch/x86/include/asm/hvm/svm/nestedsvm.h
xen/arch/x86/include/asm/hvm/vmx/vvmx.h
xen/arch/x86/mm/hap/nested_hap.c
xen/arch/x86/mm/p2m.c