ia64/xen-unstable
changeset 13236:711c31232d71
[HVM] Don't set the shadow allocation to zero if the dom is still shadowed.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author | Tim Deegan <Tim.Deegan@xensource.com> |
---|---|
date | Tue Jan 02 10:57:50 2007 +0000 (2007-01-02) |
parents | 4fc6ffff2ac5 |
children | 7cd6c032689e |
files | xen/arch/x86/mm/shadow/common.c |
line diff
1.1 --- a/xen/arch/x86/mm/shadow/common.c Sun Dec 31 12:26:42 2006 +0000 1.2 +++ b/xen/arch/x86/mm/shadow/common.c Tue Jan 02 10:57:50 2007 +0000 1.3 @@ -3306,6 +3306,15 @@ int shadow_domctl(struct domain *d, 1.4 1.5 case XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION: 1.6 shadow_lock(d); 1.7 + if ( sc->mb == 0 && shadow_mode_enabled(d) ) 1.8 + { 1.9 + /* Can't set the allocation to zero unless the domain stops using 1.10 + * shadow pagetables first */ 1.11 + SHADOW_ERROR("Can't set shadow allocation to zero, domain %u" 1.12 + " is still using shadows.\n", d->domain_id); 1.13 + shadow_unlock(d); 1.14 + return -EINVAL; 1.15 + } 1.16 rc = sh_set_allocation(d, sc->mb << (20 - PAGE_SHIFT), &preempted); 1.17 shadow_unlock(d); 1.18 if ( preempted )