Commit ea9d7c83 authored by Pierre-Clément Tosi's avatar Pierre-Clément Tosi Committed by Oliver Upton
Browse files

KVM: arm64: Fix __pkvm_init_switch_pgd call ABI



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: f320bc74 ("KVM: arm64: Prepare the creation of s1 mappings at EL2")
Signed-off-by: default avatarPierre-Clément Tosi <ptosi@google.com>
Acked-by: default avatarWill Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240610063244.2828978-3-ptosi@google.com


Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent a8f06558
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment