From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Jing Zhang <jingzhangos@google.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.4.y 3/3] KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
Date: Wed, 4 Dec 2024 17:11:36 -0500 [thread overview]
Message-ID: <20241204165413-353dc3118af6e2ab@stable.kernel.org> (raw)
In-Reply-To: <20241204202301.2715933-3-jingzhangos@google.com>
[ 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
Note: The patch differs from the upstream commit:
---
1: 7602ffd1d5e89 ! 1: 8a1b7236c891a 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);
+@@ virt/kvm/arm/vgic/vgic-its.c: static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its,
+ vgic_its_invalidate_cache(kvm);
its_free_ite(kvm, ite);
- return 0;
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.4.y | Success | Success |
next prev parent reply other threads:[~2024-12-04 23:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 20:22 [PATCH 5.4.y 1/3] KVM: arm64: vgic-its: Add a data length check in vgic_its_save_* Jing Zhang
2024-12-04 20:23 ` [PATCH 5.4.y 2/3] KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device Jing Zhang
2024-12-04 22:11 ` Sasha Levin
2024-12-04 20:23 ` [PATCH 5.4.y 3/3] KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE Jing Zhang
2024-12-04 22:11 ` Sasha Levin [this message]
2024-12-04 22:11 ` [PATCH 5.4.y 1/3] KVM: arm64: vgic-its: Add a data length check in vgic_its_save_* Sasha Levin
2024-12-06 0:47 ` Oliver Upton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241204165413-353dc3118af6e2ab@stable.kernel.org \
--to=sashal@kernel.org \
--cc=jingzhangos@google.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox