Make sure the minimum shadow allocation is never zero. Signed-off-by: Tim Deegan diff -r cba56c13ca3e xen/arch/x86/mm/shadow/common.c --- a/xen/arch/x86/mm/shadow/common.c Wed Jan 06 12:45:23 2010 +0000 +++ b/xen/arch/x86/mm/shadow/common.c Thu Jan 14 12:41:52 2010 +0000 @@ -1244,10 +1244,11 @@ * instruction, we must be able to map a large number (about thirty) VAs * at the same time, which means that to guarantee progress, we must * allow for more than ninety allocated pages per vcpu. We round that - * up to 128 pages, or half a megabyte per vcpu. */ + * up to 128 pages, or half a megabyte per vcpu, and add 1 more vcpu's + * worth to make sure we never return zero. */ static unsigned int shadow_min_acceptable_pages(struct domain *d) { - u32 vcpu_count = 0; + u32 vcpu_count = 1; struct vcpu *v; for_each_vcpu(d, v)