Messages in this thread | | | Date | Tue, 12 Jan 2021 17:48:34 +0000 | From | Marc Zyngier <> | Subject | Re: [PATCH 8/9] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace |
| |
On 2021-01-12 17:28, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> Commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the >> reporting of GICR_TYPER.Last for userspace") temporarily fixed >> a bug identified when attempting to access the GICR_TYPER >> register before the redistributor region setting but dropped >> the support of the LAST bit. This patch restores its >> support (if the redistributor region was set) while keeping the >> code safe. > > If I understand your patch correctly, it is possible for the > GICR_TYPER.Last bit > to be transiently 1 if the register is accessed before all the > redistributors > regions have been configured. > > Arm IHI 0069F states that accesses to the GICR_TYPER register are RO. I > haven't > found exactly what RO means (please point me to the definition if you > find it in > the architecture!), but I assume it means read-only and I'm not sure > how correct > (from an architectural point of view) it is for two subsequent reads of > this > register to return different values. Maybe Marc can shed some light on > this.
RO = Read-Only indeed. Not sure that's documented anywhere in the architecture, but this is enough of a well known acronym that even the ARM ARM doesn't feel the need to invent a new definition for it.
As for your concern, I don't think it is a problem to return different values if the HW has changed in between. This may need to be documented though.
Thanks,
M. -- Jazz is not dead. It just smells funny...
| |