From 7d385d1b942c6080d05548d2ab319e7af640f735 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 21 Nov 2017 20:32:29 +1100 Subject: xive: Warn on valid VPs found in abnormal cases If an allocated VP is left valid at xive_reset() or Linux tries to free a valid (enabled) VP block, print errors. The former happens occasionally if kdump'ing while KVM is running so keep it as a debug message. The latter is a programming error in Linux so use a an error log level. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith --- hw/xive.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/xive.c b/hw/xive.c index ae95772..b48b168 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -4539,6 +4539,7 @@ static void xive_reset_one(struct xive *x) continue; /* Clear it */ + xive_dbg(x, "VP 0x%x:0x%x is valid at reset\n", x->block_id, i); xive_vpc_cache_update(x, x->block_id, i, 0, 8, &vp0, false, true); } @@ -4698,8 +4699,10 @@ static int64_t opal_xive_free_vp_block(uint64_t vp_base) } /* VP must be disabled */ - if (vp->w0 & VP_W0_VALID) + if (vp->w0 & VP_W0_VALID) { + prlog(PR_ERR, "XIVE: freeing active VP %d\n", vp_id); return OPAL_XIVE_FREE_ACTIVE; + } /* Not populated */ if (vp->w1 == 0) -- cgit v1.1