On Mon, Jun 10, 2024 at 07:32:31AM +0100, Pierre-Clément Tosi wrote: > Fix the mismatch between the (incorrect) C signature, C call site, and > asm implementation by aligning all three on an API passing the > parameters (pgd and SP) separately, instead of as a bundled struct. > > Remove the now unnecessary memory accesses while the MMU is off from the > asm, which simplifies the C caller (as it does not need to convert a VA > struct pointer to PA) and makes the code slightly more robust by > offsetting the struct fields from C and properly expressing the call to > the C compiler (e.g. type checker and kCFI). > > Fixes: f320bc742bc2 ("KVM: arm64: Prepare the creation of s1 mappings at EL2") > Signed-off-by: Pierre-Clément Tosi <ptosi@xxxxxxxxxx> > --- > arch/arm64/include/asm/kvm_hyp.h | 4 ++-- > arch/arm64/kvm/hyp/nvhe/hyp-init.S | 24 +++++++++++++----------- > arch/arm64/kvm/hyp/nvhe/setup.c | 4 ++-- > 3 files changed, 17 insertions(+), 15 deletions(-) Acked-by: Will Deacon <will@xxxxxxxxxx> Will