aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2020-11-27 08:32:12 +0100
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-09-28 14:23:59 +0530
commiteba1d1b52b5b6bd5db9f850ee6365e9adc42d64a (patch)
tree0fb9d1abbe9ee7185ee2c3357b9ae3c49fcde1ff
parentcb730dc63c28830c8a20966b67515240bfc778fd (diff)
downloadskiboot-eba1d1b52b5b6bd5db9f850ee6365e9adc42d64a.zip
skiboot-eba1d1b52b5b6bd5db9f850ee6365e9adc42d64a.tar.gz
skiboot-eba1d1b52b5b6bd5db9f850ee6365e9adc42d64a.tar.bz2
xive/p9: Remove assert from xive_eq_for_target()
[ Upstream commit f07ea9564425d8005ab334dfa40f7cebe4e71fbf ] XIVE VPs are structures describing the vCPUs of guests. When starting a guest, these are allocated and enabled and some checks are done on the location of the associated ENDs, which describe the event queues. If the block of the VP and the block of the ENDs do not match, the XIVE driver asserts. Unfortunately, there is no way to check that a VP identifier is part of a VP block that was previously allocated and it is relatively easy to crash the host with a bogus VP id. That can be done with a QEMU hack on a machine using vsmt. Simply remove the assert, the OS should gracefully handle the error. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reported-by: Greg Kurz <groug@kaod.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r--hw/xive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xive.c b/hw/xive.c
index 5dc6659..905c8d3 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -2367,7 +2367,7 @@ static inline bool xive_eq_for_target(uint32_t target, uint8_t prio,
if (eq_blk != vp_blk) {
xive_err(x, "eq_blk != vp_blk (%d vs. %d) for target 0x%08x/%d\n",
eq_blk, vp_blk, target, prio);
- assert(false);
+ return false;
}
if (out_eq_blk)