[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/domain: compile with lock_profile=y enabled
commit 8916fcf4577dbaf6e0a2f7b447e17e8820b22107 Author: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> AuthorDate: Mon Dec 21 13:35:55 2015 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Dec 21 13:35:55 2015 +0100 x86/domain: compile with lock_profile=y enabled Our 'struct domain' has when lock profiling is enabled is bigger than one page. We can't use vmap nor vzalloc as both of those stash the physical address in struct page which makes the assumptions in 'arch_init_memory' trip over ASSERTs. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx> --- xen/arch/x86/domain.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 4ad5217..159d960 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -231,6 +231,7 @@ static unsigned int __init noinline _domain_struct_bits(void) struct domain *alloc_domain_struct(void) { struct domain *d; + unsigned int order = get_order_from_bytes(sizeof(*d)); #ifdef CONFIG_BIGMEM const unsigned int bits = 0; #else @@ -244,10 +245,18 @@ struct domain *alloc_domain_struct(void) bits = _domain_struct_bits(); #endif + +#ifndef LOCK_PROFILE BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); - d = alloc_xenheap_pages(0, MEMF_bits(bits)); +#endif + d = alloc_xenheap_pages(order, MEMF_bits(bits)); if ( d != NULL ) - clear_page(d); + { + unsigned int sz; + + for ( sz = 0; sz < (PAGE_SIZE << order); sz += PAGE_SIZE ) + clear_page((void *)d + sz); + } return d; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |