[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix nomigrate option implementation so that Xen builds.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1256030608 -3600 # Node ID e74a1223a09c37d371a5fc10c3f07dc83e853b8c # Parent d61a0c986a683ecec44ffda51cdec24c9cab1380 Fix nomigrate option implementation so that Xen builds. Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- tools/python/xen/xend/XendDomainInfo.py | 2 +- xen/arch/x86/domain.c | 3 --- xen/arch/x86/domctl.c | 18 ------------------ xen/common/domain.c | 7 +++++-- xen/common/domctl.c | 13 +++++++++++++ xen/include/asm-x86/domain.h | 3 --- xen/include/xen/sched.h | 3 +++ 7 files changed, 22 insertions(+), 27 deletions(-) diff -r d61a0c986a68 -r e74a1223a09c tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Tue Oct 20 08:45:12 2009 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Tue Oct 20 10:23:28 2009 +0100 @@ -2466,7 +2466,7 @@ class XendDomainInfo: # If nomigrate is set, disable migration nomigrate = self.info["platform"].get("nomigrate") - if arch.type == "x86" and nomigrate is not None and long(nomigrate) != 0: + if nomigrate is not None and long(nomigrate) != 0: xc.domain_disable_migrate(self.domid) # Optionally enable virtual HPET diff -r d61a0c986a68 -r e74a1223a09c xen/arch/x86/domain.c --- a/xen/arch/x86/domain.c Tue Oct 20 08:45:12 2009 +0100 +++ b/xen/arch/x86/domain.c Tue Oct 20 10:23:28 2009 +0100 @@ -522,9 +522,6 @@ int arch_domain_create(struct domain *d, spin_lock_init(&d->arch.vtsc_lock); - if ( d->domain_id == 0 ) - d->disable_migrate = 1; - return 0; fail: diff -r d61a0c986a68 -r e74a1223a09c xen/arch/x86/domctl.c --- a/xen/arch/x86/domctl.c Tue Oct 20 08:45:12 2009 +0100 +++ b/xen/arch/x86/domctl.c Tue Oct 20 10:23:28 2009 +0100 @@ -1100,24 +1100,6 @@ long arch_do_domctl( } break; - case XEN_DOMCTL_disable_migrate: - { - struct domain *d; - - ret = -ESRCH; - d = rcu_lock_domain_by_id(domctl->domain); - if ( d == NULL ) - break; - - domain_pause(d); - d->arch.disable_migrate = domctl->u.disable_migrate.disable; - domain_unpause(d); - - rcu_unlock_domain(d); - ret = 0; - } - break; - case XEN_DOMCTL_suppress_spurious_page_faults: { struct domain *d; diff -r d61a0c986a68 -r e74a1223a09c xen/common/domain.c --- a/xen/common/domain.c Tue Oct 20 08:45:12 2009 +0100 +++ b/xen/common/domain.c Tue Oct 20 10:23:28 2009 +0100 @@ -239,8 +239,11 @@ struct domain *domain_create( if ( domcr_flags & DOMCRF_hvm ) d->is_hvm = 1; - if ( (domid == 0) && opt_dom0_vcpus_pin ) - d->is_pinned = 1; + if ( domid == 0 ) + { + d->is_pinned = opt_dom0_vcpus_pin; + d->disable_migrate = 1; + } if ( domcr_flags & DOMCRF_dummy ) return d; diff -r d61a0c986a68 -r e74a1223a09c xen/common/domctl.c --- a/xen/common/domctl.c Tue Oct 20 08:45:12 2009 +0100 +++ b/xen/common/domctl.c Tue Oct 20 10:23:28 2009 +0100 @@ -948,6 +948,19 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc } break; + case XEN_DOMCTL_disable_migrate: + { + struct domain *d; + ret = -ESRCH; + if ( (d = rcu_lock_domain_by_id(op->domain)) != NULL ) + { + d->disable_migrate = op->u.disable_migrate.disable; + rcu_unlock_domain(d); + ret = 0; + } + } + break; + default: ret = arch_do_domctl(op, u_domctl); break; diff -r d61a0c986a68 -r e74a1223a09c xen/include/asm-x86/domain.h --- a/xen/include/asm-x86/domain.h Tue Oct 20 08:45:12 2009 +0100 +++ b/xen/include/asm-x86/domain.h Tue Oct 20 10:23:28 2009 +0100 @@ -304,9 +304,6 @@ struct arch_domain spinlock_t vtsc_lock; uint64_t vtsc_kerncount; /* for hvm, counts all vtsc */ uint64_t vtsc_usercount; /* not used for hvm */ - - /* mark domain as non-migratable and non-restoreable */ - bool_t disable_migrate; } __cacheline_aligned; #define has_arch_pdevs(d) (!list_empty(&(d)->arch.pdev_list)) diff -r d61a0c986a68 -r e74a1223a09c xen/include/xen/sched.h --- a/xen/include/xen/sched.h Tue Oct 20 08:45:12 2009 +0100 +++ b/xen/include/xen/sched.h Tue Oct 20 10:23:28 2009 +0100 @@ -278,6 +278,9 @@ struct domain void *tmem; struct lock_profile_qhead profile_head; + + /* Non-migratable and non-restoreable? */ + bool_t disable_migrate; }; struct domain_setup_info _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |