All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/intc/arm_gicv5: Make IRS_IDR0 reads return actual value, not 0
@ 2026-10-08  9:23 Peter Maydell
  2026-10-08  9:36 ` Philippe Mathieu-Daudé
  2026-10-09  9:18 ` Jim MacArthur
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2026-10-08  9:23 UTC (permalink / raw)
  To: qemu-arm, qemu-devel

IN the code for handling reads of IRS_IDR0, we carefully construct
the correct value starting with cs->irs_idr0 and adjusting it.
However, we never actually write the final value into *data, so
the guest will always see zero.

We didn't notice this before, because Linux happens to not care
about this register value except to check for the presence of
virtualization.

Cc: qemu-stable@nongnu.org
Fixes: 405ad2e76f13254 ("hw/intc/arm_gicv5: Implement IRS ID regs")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/intc/arm_gicv5.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/intc/arm_gicv5.c b/hw/intc/arm_gicv5.c
index 08878193dfc..ebfb0878af3 100644
--- a/hw/intc/arm_gicv5.c
+++ b/hw/intc/arm_gicv5.c
@@ -1433,6 +1433,7 @@ static bool config_readl(GICv5 *s, GICv5Domain domain, hwaddr offset,
             /* ...which means VIRT_ONE_N is also RES0 */
             v &= ~R_IRS_IDR0_VIRT_ONE_N_MASK;
         }
+        *data = v;
         return true;
 
     case A_IRS_IDR1:
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-09 10:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08  9:23 [PATCH] hw/intc/arm_gicv5: Make IRS_IDR0 reads return actual value, not 0 Peter Maydell
2026-10-08  9:36 ` Philippe Mathieu-Daudé
2026-10-09  9:48   ` Jim MacArthur
2026-10-09 10:06     ` Philippe Mathieu-Daudé
2026-10-09  9:18 ` Jim MacArthur

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.