aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xive.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/hw/xive.c b/hw/xive.c
index b48b168..e6b233c 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -4494,10 +4494,15 @@ static void xive_reset_one(struct xive *x)
* we will incorrectly free the EQs that are reserved
* for the physical CPUs
*/
- eq0 = *eq;
- xive_cleanup_eq(&eq0);
- xive_eqc_cache_update(x, x->block_id,
- idx, 0, 4, &eq0, false, true);
+ if (eq->w0 & EQ_W0_VALID) {
+ if (!(eq->w0 & EQ_W0_FIRMWARE))
+ xive_dbg(x, "EQ 0x%x:0x%x is valid at reset: %08x %08x\n",
+ x->block_id, idx, eq->w0, eq->w1);
+ eq0 = *eq;
+ xive_cleanup_eq(&eq0);
+ xive_eqc_cache_update(x, x->block_id,
+ idx, 0, 4, &eq0, false, true);
+ }
if (eq->w0 & EQ_W0_FIRMWARE)
eq_firmware = true;
}