]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Fix the descriptor address in __kvm_at_swap_desc()
authorZenghui Yu (Huawei) <zenghui.yu@linux.dev>
Tue, 17 Mar 2026 11:57:48 +0000 (19:57 +0800)
committerMarc Zyngier <maz@kernel.org>
Tue, 17 Mar 2026 13:40:00 +0000 (13:40 +0000)
commit0496acc42fb51eee040b5170cec05cec41385540
tree7a691477ad54d4f844f27652eb57d05bcd398b89
parent1744a6ef48b9a48f017e3e1a0d05de0a6978396e
KVM: arm64: Fix the descriptor address in __kvm_at_swap_desc()

Using "(u64 __user *)hva + offset" to get the virtual addresses of S1/S2
descriptors looks really wrong, if offset is not zero. What we want to get
for swapping is hva + offset, not hva + offset*8. ;-)

Fix it.

Fixes: f6927b41d573 ("KVM: arm64: Add helper for swapping guest descriptor")
Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev>
Link: https://patch.msgid.link/20260317115748.47332-1-zenghui.yu@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
arch/arm64/kvm/at.c