[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] domain: Compile with lock_profile=y enabled.
>>> On 02.11.15 at 18:12, <konrad.wilk@xxxxxxxxxx> wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -237,6 +237,7 @@ struct domain *alloc_domain_struct(void) > #ifdef CONFIG_BIGMEM > const unsigned int bits = 0; > #else > + int order = get_order_from_bytes(sizeof(*d)); unsigned int > @@ -247,10 +248,12 @@ struct domain *alloc_domain_struct(void) > bits = _domain_struct_bits(); > #endif > > - BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); Not unconditionally (i.e. at least non-debug builds should continue to have this). > - d = alloc_xenheap_pages(0, MEMF_bits(bits)); > + d = alloc_xenheap_pages(order, MEMF_bits(bits)); > if ( d != NULL ) > - clear_page(d); > + { > + for ( ; order >= 0; order-- ) > + clear_page((void *)d + PAGE_SIZE*order); This loop works for orders 0 and 1, but not anything else (not clearing all of the pages). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |