[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: 7602ffd1d5e8927fadd5187cb4aed2fdc9c47143
WARNING: Author mismatch between patch and upstream commit: Backport author: Jing Zhang jingzhangos@google.com Commit author: Kunkun Jiang jiangkunkun@huawei.com
Status in newer kernel trees: 6.12.y | Present (different SHA1: 98b18dff427f) 6.11.y | Present (different SHA1: 85272e522655) 6.6.y | Present (different SHA1: 9359737ade6c) 6.1.y | Present (different SHA1: 1f6c9a5c3b12) 5.15.y | Present (different SHA1: 04e670725c10) 5.10.y | Present (different SHA1: e428da1e025c) 5.4.y | Not found 4.19.y | Not found
Note: The patch differs from the upstream commit: --- 1: 7602ffd1d5e89 ! 1: 4e15f6a83bea5 KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE @@ Metadata ## Commit message ## KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
+ commit 7602ffd1d5e8927fadd5187cb4aed2fdc9c47143 upstream. + 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 @@ Commit message 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 ## -@@ arch/arm64/kvm/vgic/vgic-its.c: static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its, + ## virt/kvm/arm/vgic/vgic-its.c ## +@@ virt/kvm/arm/vgic/vgic-its.c: static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its,
ite = find_ite(its, device_id, event_id); - if (ite && its_is_collection_mapped(ite->collection)) { + if (ite && ite->collection) { + struct its_device *device = find_its_device(its, device_id); + int ite_esz = vgic_its_get_abi(its)->ite_esz; + gpa_t gpa = device->itt_addr + ite->event_id * ite_esz; /* * Though the spec talks about removing the pending state, we * don't bother here since we clear the ITTE anyway and the -@@ arch/arm64/kvm/vgic/vgic-its.c: static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its, - vgic_its_invalidate_cache(its); - + * pending state is a property of the ITTE struct. + */ its_free_ite(kvm, ite); - return 0; + ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-4.19.y | Success | Success |