If a CPU asks for the virtual HPPI for its resident VPE, return it.
Signed-off-by: Peter Maydell <[email protected]>
---
hw/intc/arm_gicv5.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/intc/arm_gicv5.c b/hw/intc/arm_gicv5.c
index 199547abaed..ab0cd1d80e5 100644
--- a/hw/intc/arm_gicv5.c
+++ b/hw/intc/arm_gicv5.c
@@ -348,11 +348,13 @@ GICv5PendingIrq gicv5_get_hppi(GICv5Common *cs,
GICv5Domain domain,
assert(cpuidx < cs->num_cpus);
if (virtual) {
- /*
- * Until we implement virtualization there is never
- * an available virtual HPPI candidate.
- */
- return GICV5_PENDING_IRQ_NONE;
+ VPE *vpe = s->res_vpe[cpuidx];
+
+ if (!vpe || vpe->vmte->domain != domain) {
+ return GICV5_PENDING_IRQ_NONE;
+ }
+
+ return vpe->vhppi;
}
return s->hppi[domain][cpuidx];
}
--
2.43.0