* [PATCH] KVM: arm64: vgic-its: Reword the comment on a collection-less ITE
@ 2026-08-17 9:27 Fuad Tabba
2026-08-17 9:40 ` Eric Auger
0 siblings, 1 reply; 2+ messages in thread
From: Fuad Tabba @ 2026-08-17 9:27 UTC (permalink / raw)
To: Marc Zyngier, Oliver Upton
Cc: Eric Auger, Joey Gouly, Steffen Eiden, Suzuki K Poulose,
Zenghui Yu, Will Deacon, Sascha Bischoff, Sebastian Ene,
Fuad Tabba, kvmarm, linux-arm-kernel, linux-kernel
The comment above the NULL collection check in vgic_its_save_ite()
names only MAPC with V=0, which is UNPREDICTABLE. The route that
requires the check is clearing GITS_BASER<coll>.Valid on a disabled
ITS, a legitimate operation that orphans every ITE at once. Name both
routes.
No functional change intended.
Suggested-by: Eric Auger <eauger@redhat.com>
Link: https://lore.kernel.org/all/0ce5e496-a067-48fd-80d2-94fe9981d505@redhat.com/
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
Notes:
Based on kvmarm/next, since the comment this reworks was added by
c6c156d931c3 ("KVM: arm64: vgic-its: Don't dereference a NULL collection
on ITT save") and is not in a release yet.
arch/arm64/kvm/vgic/vgic-its.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index f6538b1976f9b..26c665e0a2386 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -2112,9 +2112,9 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
u64 val;
/*
- * MAPC with V=0 keeps the ITEs mapped but drops their collection,
- * and with it the ICID. Save a zeroed entry, which the restore path
- * reads back as invalid.
+ * MAPC with V=0 and clearing GITS_BASER<coll>.Valid both keep the
+ * ITEs mapped while dropping their collection, and with it the ICID.
+ * Save a zeroed entry, which the restore path reads back as invalid.
*/
if (!ite->collection)
return vgic_its_write_entry_lock(its, gpa, 0ULL, ite);
base-commit: 57e7cf13ac26bf1a3dba6cfa601f7b2481811575
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: arm64: vgic-its: Reword the comment on a collection-less ITE
2026-08-17 9:27 [PATCH] KVM: arm64: vgic-its: Reword the comment on a collection-less ITE Fuad Tabba
@ 2026-08-17 9:40 ` Eric Auger
0 siblings, 0 replies; 2+ messages in thread
From: Eric Auger @ 2026-08-17 9:40 UTC (permalink / raw)
To: Fuad Tabba, Marc Zyngier, Oliver Upton
Cc: Joey Gouly, Steffen Eiden, Suzuki K Poulose, Zenghui Yu,
Will Deacon, Sascha Bischoff, Sebastian Ene, Fuad Tabba, kvmarm,
linux-arm-kernel, linux-kernel
On 8/17/26 11:27 AM, Fuad Tabba wrote:
> The comment above the NULL collection check in vgic_its_save_ite()
> names only MAPC with V=0, which is UNPREDICTABLE. The route that
> requires the check is clearing GITS_BASER<coll>.Valid on a disabled
> ITS, a legitimate operation that orphans every ITE at once. Name both
> routes.
>
> No functional change intended.
>
> Suggested-by: Eric Auger <eauger@redhat.com>
> Link: https://lore.kernel.org/all/0ce5e496-a067-48fd-80d2-94fe9981d505@redhat.com/
> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
> ---
>
> Notes:
> Based on kvmarm/next, since the comment this reworks was added by
> c6c156d931c3 ("KVM: arm64: vgic-its: Don't dereference a NULL collection
> on ITT save") and is not in a release yet.
>
> arch/arm64/kvm/vgic/vgic-its.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
> index f6538b1976f9b..26c665e0a2386 100644
> --- a/arch/arm64/kvm/vgic/vgic-its.c
> +++ b/arch/arm64/kvm/vgic/vgic-its.c
> @@ -2112,9 +2112,9 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
> u64 val;
>
> /*
> - * MAPC with V=0 keeps the ITEs mapped but drops their collection,
> - * and with it the ICID. Save a zeroed entry, which the restore path
> - * reads back as invalid.
> + * MAPC with V=0 and clearing GITS_BASER<coll>.Valid both keep the
> + * ITEs mapped while dropping their collection, and with it the ICID.
> + * Save a zeroed entry, which the restore path reads back as invalid.
> */
> if (!ite->collection)
> return vgic_its_write_entry_lock(its, gpa, 0ULL, ite);
>
> base-commit: 57e7cf13ac26bf1a3dba6cfa601f7b2481811575
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-17 9:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 9:27 [PATCH] KVM: arm64: vgic-its: Reword the comment on a collection-less ITE Fuad Tabba
2026-08-17 9:40 ` Eric Auger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.