diff options
| author | Hyunwoo Kim <imv4bel@gmail.com> | 2026-06-07 02:56:10 +0900 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-06-07 14:07:06 +0100 |
| commit | e8042f6e1d7befb2fb6b10a75918642bcd0acf9a (patch) | |
| tree | 2155652de184e4cb4e52bc795893b19270fe9ea9 /include/linux/debugobjects.h | |
| parent | cada2549ca4c934e6fb3801f857c6b4b0c36490b (diff) | |
KVM: arm64: Clear __hyp_running_vcpu when flushing the pKVM hyp vCPU
flush_hyp_vcpu() copies the host vCPU context into the hyp's private
vCPU on every run. ctxt_to_vcpu() expects a guest context to have a
NULL __hyp_running_vcpu, which is only ever set on the host context, so
that it resolves the vCPU via container_of(). While this is generally
the case, flush_hyp_vcpu() copies the context verbatim and does not
enforce this, so a value provided by the host is dereferenced at EL2
(host -> EL2).
Fix by clearing __hyp_running_vcpu after the copy.
Cc: stable@vger.kernel.org
Fixes: be66e67f1750 ("KVM: arm64: Use the pKVM hyp vCPU structure in handle___kvm_vcpu_run()")
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260606175614.83273-2-imv4bel@gmail.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
