Merge branch kvm-arm64/hyp-type-checking-7.4 into kvmarm-master/next * kvm-arm64/hyp-type-checking-7.4: : \ : Restore some sanity in the EL2 department by enforcing the type : checking that was lost when converting the KVM internal : interface to SMCCC. Patches courtesy of Fuad Tabba. : : From the cover letter: : : "This series implements that, in plain preprocessor macros rather than : an external generator, in the mold of the syscall wrappers. Each : hypercall's signature is declared once, in kvm_hcall.h: : kvm_call_hyp_nvhe() resolves to a typed nvhe_hvc_##f() stub generated : from the declaration, and the hyp-main.c handlers unmarshal their : arguments through glue that is type-checked against the same : declaration. A mistyped or stale call, or a handler that drifts from : its caller, now fails to compile. On top of that shared declaration, : host-VA parameters gain a __kern sparse address space, so : dereferencing one at EL2 without kern_hyp_va_host() translation is : flagged by sparse. The address space is KVM-private and lives with the : interface it annotates rather than in compiler_types.h, like x86's : __seg_gs in asm/percpu.h. The deeper instances of that bug class, host : VAs reached through struct fields after the boundary, are follow-up : work." : / KVM: arm64: Tag host-VA hypercall parameters __kern KVM: arm64: nVHE: Check hypercall handlers against the declared ABI KVM: arm64: Type-check hypercall arguments at the caller KVM: arm64: Move the host hypercall interface to its own header KVM: arm64: nVHE: Pass host VA arguments as pointers arm64: pi: Run the source checker on the libfdt objects under C=2 KVM: arm64: nVHE: Run the source checker under C=2 KVM: arm64: nVHE: Use NULL to reset the trace buffer backing pointer KVM: arm64: nVHE: Declare the hyp event IDs before defining them KVM: arm64: nVHE: Share the stacktrace per-CPU declarations with EL2 tracing: Include linux/types.h in trace_remote_event.h Signed-off-by: Marc Zyngier <maz@kernel.org>