aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xive.c b/hw/xive.c
index 26edd66..4fd8a30 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -4463,12 +4463,14 @@ static int64_t opal_xive_free_vp_block(uint64_t vp_base)
return OPAL_PARAMETER;
if (order < (xive_chips_alloc_bits + 1))
return OPAL_PARAMETER;
+ if (idx & ((1 << (order - xive_chips_alloc_bits)) - 1))
+ return OPAL_PARAMETER;
#else
if (order < 1)
return OPAL_PARAMETER;
-#endif
if (idx & ((1 << order) - 1))
return OPAL_PARAMETER;
+#endif
count = 1 << order;
for (i = 0; i < count; i++) {