]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
authorKunkun Jiang <jiangkunkun@huawei.com>
Thu, 7 Nov 2024 21:41:37 +0000 (13:41 -0800)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 11 Nov 2024 19:54:03 +0000 (19:54 +0000)
commit7602ffd1d5e8927fadd5187cb4aed2fdc9c47143
tree3462ac1cdf8ebf7b409ced933443bca93158c378
parente9649129d33dca561305fc590a7c4ba8c3e5675a
KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE

When DISCARD frees an ITE, it does not invalidate the
corresponding ITE. In the scenario of continuous saves and
restores, there may be a situation where an ITE is not saved
but is restored. This is unreasonable and may cause restore
to fail. This patch clears the corresponding ITE when DISCARD
frees an ITE.

Cc: stable@vger.kernel.org
Fixes: eff484e0298d ("KVM: arm64: vgic-its: ITT save and restore")
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
[Jing: Update with entry write helper]
Signed-off-by: Jing Zhang <jingzhangos@google.com>
Link: https://lore.kernel.org/r/20241107214137.428439-6-jingzhangos@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic-its.c