vgic-v3: Ignore writes to GICD_ISACTIVER{nE}..GICD_ISACTIVER{nE}N
PATCH 1/1 vgic-v3: Ignore writes to GICD_ISACTIVER{nE}..GICD_ISACTIVER{nE}N
Similar to other registers like ICPENDR and ICACTIVER, ignore the writes instead of injecting fault into the guest and thus crashing it. This was already the case for extended registers prior to introducing GICV3_ESPI.
--- xen/arch/arm/vgic-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/arm/vgic-v3.c +2 -1
@@ -887,7 +887,8 @@ static int __vgic_v3_distr_common_mmio_write(const char *name, struct vcpu *v,printk (XENLOG_G_ERR "%pv: %s: unhandled word write %#" PRIregister" to ISACTIVER%dE\n" , v, name, r, reg - GICD_ISACTIVERnE); -return 0 ; + + goto write_ignore;case VRANGE32 (GICD_ICACTIVER ,GICD_ICACTIVERN ):case VRANGE32 (GICD_ICACTIVERnE, GICD_ICACTIVERnEN):
Signature · 1 line
2.43.0
Hi,
Quoted 2 lines · Michal Orzel
Similar to other registers like ICPENDR and ICACTIVER, ignore the writes instead of injecting fault into the guest and thus crashing it.
Sure... But you are potentially introducing an instability in the guest OS which may be difficult to diagnose. So why is it better?
Quoted 2 lines
This was
already the case for extended registers prior to introducingGICV3_ESPI.
Why only the vGICv3?
Quoted 11 lines
Signed-off-by Michal Orzel <[email protected]>--- xen/arch/arm/vgic-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/arch/arm/vgic-v3.c +0
-0
xen/arch/arm/vgic-v3.c static int __vgic_v3_distr_common_mmio_write(const char *name, struct vcpu *v, · line 891
Quoted 6 lines
xen/arch/arm/vgic-v3.c +2
-1@@ -887,7 +887,8 @@ static int __vgic_v3_distr_common_mmio_write(const char *name, struct vcpu *v,printk (XENLOG_G_ERR "%pv: %s: unhandled word write %#" PRIregister" to ISACTIVER%dE\n" , v, name, r, reg - GICD_ISACTIVERnE); -return 0 ; + + goto write_ignore;
I know we already use that for ICACTIVER. But this is against the specification. We can't just ignore a guest asking to activate an interrupt.
The commit message really some details on why we want to do ignore the write (IOW is this impacting an OS) and what's the consequence to ignore the request?
xen/arch/arm/vgic-v3.c static int __vgic_v3_distr_common_mmio_write(const char *name, struct vcpu *v, · line 894
Quoted 3 lines
xen/arch/arm/vgic-v3.c +0
-0case VRANGE32 (GICD_ICACTIVER ,GICD_ICACTIVERN ):case VRANGE32 (GICD_ICACTIVERnE, GICD_ICACTIVERnEN):
Cheers,
Signature · 1 line
Julien Grall