From 6b1cc437315d81267597756a78777da8001e2d04 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 21 Nov 2017 20:32:28 +1100 Subject: xive: Properly reserve built-in VPs in non-group mode This is not normally used but if the #define is changed to disable block group mode we would incorrectly clear the buddy completely without marking the built-in VPs reserved. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith --- hw/xive.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/xive.c') diff --git a/hw/xive.c b/hw/xive.c index e5b97b5..ae95772 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -4546,6 +4546,8 @@ static void xive_reset_one(struct xive *x) #ifndef USE_BLOCK_GROUP_MODE /* If block group mode isn't enabled, reset VP alloc buddy */ buddy_reset(x->vp_buddy); + if (x->block_id == 0) + assert(buddy_reserve(x->vp_buddy, 0x800, 11)); #endif #ifdef USE_INDIRECT -- cgit v1.1