[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] domain_create: No need to zero new domain struct as done by arch-dep code



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1273222934 -3600
# Node ID 891f9a0cf760401231796421d503aa6c0dfc83fe
# Parent  535bf8e72dd23ae91b8b3bb1ae8ab49ad15c402b
domain_create: No need to zero new domain struct as done by arch-dep code

Fix ia64 to always make this the case.

Signed-off-by: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/domain.c |    9 +++++----
 xen/common/domain.c        |    1 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -r 535bf8e72dd2 -r 891f9a0cf760 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Fri May 07 10:00:43 2010 +0100
+++ b/xen/arch/ia64/xen/domain.c        Fri May 07 10:02:14 2010 +0100
@@ -407,20 +407,21 @@ void relinquish_vcpu_resources(struct vc
 
 struct domain *alloc_domain_struct(void)
 {
+       struct domain *d;
 #ifdef CONFIG_IA64_PICKLE_DOMAIN
-       struct domain *d;
        /*
         * We pack the MFN of the domain structure into a 32-bit field within
         * the page_info structure. Hence the MEMF_bits() restriction.
         */
        d = alloc_xenheap_pages(get_order_from_bytes(sizeof(*d)),
                                MEMF_bits(32 + PAGE_SHIFT));
+#else
+       d = xmalloc(struct domain);
+#endif
+
        if ( d != NULL )
                memset(d, 0, sizeof(*d));
        return d;
-#else
-       return xmalloc(struct domain);
-#endif
 }
 
 void free_domain_struct(struct domain *d)
diff -r 535bf8e72dd2 -r 891f9a0cf760 xen/common/domain.c
--- a/xen/common/domain.c       Fri May 07 10:00:43 2010 +0100
+++ b/xen/common/domain.c       Fri May 07 10:02:14 2010 +0100
@@ -223,7 +223,6 @@ struct domain *domain_create(
     if ( (d = alloc_domain_struct()) == NULL )
         return NULL;
 
-    memset(d, 0, sizeof(*d));
     d->domain_id = domid;
 
     lock_profile_register_struct(LOCKPROF_TYPE_PERDOM, d, domid, "Domain");

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.