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

Re: [Xen-devel] [PATCH 06/20] PVH xen: Move e820 fields out of pv_domain struct



>>> On 15.05.13 at 02:52, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -569,7 +569,7 @@ int arch_domain_create(struct domain *d, unsigned int 
> domcr_flags)
>          /* 64-bit PV guest by default. */
>          d->arch.is_32bit_pv = d->arch.has_32bit_shinfo = 0;
>  
> -        spin_lock_init(&d->arch.pv_domain.e820_lock);
> +        spin_lock_init(&d->arch.e820_lock);
>      }
>  
>      /* initialize default tsc behavior in case tools don't */
> @@ -595,7 +595,7 @@ void arch_domain_destroy(struct domain *d)
>      if ( is_hvm_domain(d) )
>          hvm_domain_destroy(d);
>      else
> -        xfree(d->arch.pv_domain.e820);
> +        xfree(d->arch.e820);
>  
>      free_domain_pirqs(d);
>      if ( !is_idle_domain(d) )

Such initialization and cleanup shouldn't remain conditional upon
!is_hvm_domain() if the fields are now universal - while not an
immediate bug, it's nevertheless a latent one.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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