diff options
-rw-r--r-- | xen/common/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c index df85b550a1..2c86934ae8 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -854,7 +854,7 @@ int xenmem_add_to_physmap(struct domain *d, struct xen_add_to_physmap *xatp, ++extra.ppage; /* Check for continuation if it's not the last iteration. */ - if ( (++done > ARRAY_SIZE(pages) && extra.ppage) || + if ( (++done >= ARRAY_SIZE(pages) && extra.ppage) || (xatp->size > done && hypercall_preempt_check()) ) { rc = start + done; |