[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/5] x86: widen NUMA nodes to be allocated from
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -285,7 +285,8 @@ struct vcpu_guest_context *alloc_vcpu_gu for ( i = 0; i < PFN_UP(sizeof(struct vcpu_guest_context)); ++i ) { - struct page_info *pg = alloc_domheap_page(NULL, 0); + struct page_info *pg = alloc_domheap_page(current->domain, + MEMF_no_owner); if ( unlikely(pg == NULL) ) { @@ -322,7 +323,7 @@ static int setup_compat_l4(struct vcpu * l4_pgentry_t *l4tab; int rc; - pg = alloc_domheap_page(NULL, MEMF_node(vcpu_to_node(v))); + pg = alloc_domheap_page(v->domain, MEMF_no_owner); if ( pg == NULL ) return -ENOMEM; --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -1182,7 +1182,7 @@ int __init construct_dom0( } else { - page = alloc_domheap_page(NULL, 0); + page = alloc_domheap_page(d, MEMF_no_owner); if ( !page ) panic("Not enough RAM for domain 0 PML4"); page->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1; --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -150,7 +150,7 @@ long arch_do_domctl( break; } - page = alloc_domheap_page(NULL, 0); + page = alloc_domheap_page(current->domain, MEMF_no_owner); if ( !page ) { ret = -ENOMEM; --- a/xen/arch/x86/hvm/stdvga.c +++ b/xen/arch/x86/hvm/stdvga.c @@ -604,7 +604,7 @@ void stdvga_init(struct domain *d) for ( i = 0; i != ARRAY_SIZE(s->vram_page); i++ ) { - pg = alloc_domheap_page(NULL, MEMF_node(domain_to_node(d))); + pg = alloc_domheap_page(d, MEMF_no_owner); if ( pg == NULL ) break; s->vram_page[i] = pg; --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -1417,7 +1417,6 @@ HVM_REGISTER_SAVE_RESTORE(LAPIC_REGS, la int vlapic_init(struct vcpu *v) { struct vlapic *vlapic = vcpu_vlapic(v); - unsigned int memflags = MEMF_node(vcpu_to_node(v)); HVM_DBG_LOG(DBG_LEVEL_VLAPIC, "%d", v->vcpu_id); @@ -1431,7 +1430,7 @@ int vlapic_init(struct vcpu *v) if (vlapic->regs_page == NULL) { - vlapic->regs_page = alloc_domheap_page(NULL, memflags); + vlapic->regs_page = alloc_domheap_page(v->domain, MEMF_no_owner); if ( vlapic->regs_page == NULL ) { dprintk(XENLOG_ERR, "alloc vlapic regs error: %d/%d\n", --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5879,7 +5879,6 @@ int create_perdomain_mapping(struct doma l3_pgentry_t *l3tab; l2_pgentry_t *l2tab; l1_pgentry_t *l1tab; - unsigned int memf = MEMF_node(domain_to_node(d)); int rc = 0; ASSERT(va >= PERDOMAIN_VIRT_START && @@ -5887,7 +5886,7 @@ int create_perdomain_mapping(struct doma if ( !d->arch.perdomain_l3_pg ) { - pg = alloc_domheap_page(NULL, MEMF_node(domain_to_node(d))); + pg = alloc_domheap_page(d, MEMF_no_owner); if ( !pg ) return -ENOMEM; l3tab = __map_domain_page(pg); @@ -5908,7 +5907,7 @@ int create_perdomain_mapping(struct doma if ( !(l3e_get_flags(l3tab[l3_table_offset(va)]) & _PAGE_PRESENT) ) { - pg = alloc_domheap_page(NULL, memf); + pg = alloc_domheap_page(d, MEMF_no_owner); if ( !pg ) { unmap_domain_page(l3tab); @@ -5937,7 +5936,7 @@ int create_perdomain_mapping(struct doma { if ( pl1tab && !IS_NIL(pl1tab) ) { - l1tab = alloc_xenheap_pages(0, memf); + l1tab = alloc_xenheap_pages(0, MEMF_node(domain_to_node(d))); if ( !l1tab ) { rc = -ENOMEM; @@ -5949,7 +5948,7 @@ int create_perdomain_mapping(struct doma } else { - pg = alloc_domheap_page(NULL, memf); + pg = alloc_domheap_page(d, MEMF_no_owner); if ( !pg ) { rc = -ENOMEM; @@ -5966,7 +5965,7 @@ int create_perdomain_mapping(struct doma if ( ppg && !(l1e_get_flags(l1tab[l1_table_offset(va)]) & _PAGE_PRESENT) ) { - pg = alloc_domheap_page(NULL, memf); + pg = alloc_domheap_page(d, MEMF_no_owner); if ( pg ) { clear_domain_page(page_to_mfn(pg)); --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -331,7 +331,7 @@ hap_set_allocation(struct domain *d, uns if ( d->arch.paging.hap.total_pages < pages ) { /* Need to allocate more memory from domheap */ - pg = alloc_domheap_page(NULL, MEMF_node(domain_to_node(d))); + pg = alloc_domheap_page(d, MEMF_no_owner); if ( pg == NULL ) { HAP_PRINTK("failed to allocate hap pages.\n"); --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -1677,7 +1677,7 @@ static unsigned int sh_set_allocation(st { /* Need to allocate more memory from domheap */ sp = (struct page_info *) - alloc_domheap_page(NULL, MEMF_node(domain_to_node(d))); + alloc_domheap_page(d, MEMF_no_owner); if ( sp == NULL ) { SHADOW_PRINTK("failed to allocate shadow pages.\n"); Attachment:
x86-alloc-for-domain.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |