arm: allocate top level p2m page for all non-idle VCPUs
PATCH 1/1 arm: allocate top level p2m page for all non-idle VCPUs
Not just dom0.
Signed-off-by Ian Campbell <[email protected]>
--- xen/arch/arm/domain.c | 3 +++ xen/arch/arm/domain_build.c | 3 --- xen/arch/arm/p2m.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
xen/arch/arm/domain.c +3 -0
@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)clear_page (d->shared_info);share_xen_page_with_guest (virt_to_page (d->shared_info), d, XENSHARE_writable); + +if ( (rc =p2m_alloc_table (d)) !=0 ) + goto fail; } d->max_vcpus =8 ;
xen/arch/arm/domain_build.c +0 -3
@@ -93,9 +93,6 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U ; -if ( (rc =p2m_alloc_table (d)) !=0 ) -return rc; -printk ("Populate P2M %#llx->%#llx\n" , kinfo.ram_start, kinfo.ram_end);p2m_populate_ram (d, kinfo.ram_start, kinfo.ram_end);
xen/arch/arm/p2m.c +1 -1
@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)void *p;/* First level P2M is 2 consecutive pages */ - page =alloc_domheap_pages (d,1 ,0 ); + page =alloc_domheap_pages (NULL ,1 ,0 );if ( page ==NULL )return -ENOMEM ;
Signature · 1 line
1.7.2.5
BTW this depends on Stefano's "arm: shared_info page allocation and mapping". I'm happy to hold on to it until then but thought I'd send for review now...
Quoted 50 lines · Ian Campbell
Not just dom0.
Signed-off-by Ian Campbell <[email protected]>--- xen/arch/arm/domain.c | 3 +++ xen/arch/arm/domain_build.c | 3 --- xen/arch/arm/p2m.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)xen/arch/arm/domain.c +3
-0@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)clear_page (d->shared_info);share_xen_page_with_guest (virt_to_page (d->shared_info), d, XENSHARE_writable); + +if ( (rc =p2m_alloc_table (d)) !=0 ) + goto fail; } d->max_vcpus =8 ;xen/arch/arm/domain_build.c +0
-3@@ -93,9 +93,6 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U ; -if ( (rc =p2m_alloc_table (d)) !=0 ) -return rc; -printk ("Populate P2M %#llx->%#llx\n" , kinfo.ram_start, kinfo.ram_end);p2m_populate_ram (d, kinfo.ram_start, kinfo.ram_end);xen/arch/arm/p2m.c +1
-1@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)void *p;/* First level P2M is 2 consecutive pages */ - page =alloc_domheap_pages (d,1 ,0 ); + page =alloc_domheap_pages (NULL ,1 ,0 );if ( page ==NULL )return -ENOMEM ;
Quoted 2 lines · Ian Campbell
arm: allocate top level p2m page for all non-idle VCPUs
ITYM non-idle domains. Otherwise, ack.
Tim.
Quoted 58 lines
Not just dom0.
Signed-off-by Ian Campbell <[email protected]>--- xen/arch/arm/domain.c | 3 +++ xen/arch/arm/domain_build.c | 3 --- xen/arch/arm/p2m.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)xen/arch/arm/domain.c +3
-0@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)clear_page (d->shared_info);share_xen_page_with_guest (virt_to_page (d->shared_info), d, XENSHARE_writable); + +if ( (rc =p2m_alloc_table (d)) !=0 ) + goto fail; } d->max_vcpus =8 ;xen/arch/arm/domain_build.c +0
-3@@ -93,9 +93,6 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U ; -if ( (rc =p2m_alloc_table (d)) !=0 ) -return rc; -printk ("Populate P2M %#llx->%#llx\n" , kinfo.ram_start, kinfo.ram_end);p2m_populate_ram (d, kinfo.ram_start, kinfo.ram_end);xen/arch/arm/p2m.c +1
-1@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)void *p;/* First level P2M is 2 consecutive pages */ - page =alloc_domheap_pages (d,1 ,0 ); + page =alloc_domheap_pages (NULL ,1 ,0 );if ( page ==NULL )return -ENOMEM ;Signature · 7 lines
1.7.2.5 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 5 lines · Tim Deegan
Quoted 2 lines · Ian Campbell
arm: allocate top level p2m page for all non-idle VCPUs
ITYM non-idle domains.
Oh yes.
Quoted 1 line
Otherwise, ack.
Thanks.
Quoted 61 lines
Tim.
Quoted 58 lines
Not just dom0.
Signed-off-by Ian Campbell <[email protected]>--- xen/arch/arm/domain.c | 3 +++ xen/arch/arm/domain_build.c | 3 --- xen/arch/arm/p2m.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)xen/arch/arm/domain.c +3
-0@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)clear_page (d->shared_info);share_xen_page_with_guest (virt_to_page (d->shared_info), d, XENSHARE_writable); + +if ( (rc =p2m_alloc_table (d)) !=0 ) + goto fail; } d->max_vcpus =8 ;xen/arch/arm/domain_build.c +0
-3@@ -93,9 +93,6 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U ; -if ( (rc =p2m_alloc_table (d)) !=0 ) -return rc; -printk ("Populate P2M %#llx->%#llx\n" , kinfo.ram_start, kinfo.ram_end);p2m_populate_ram (d, kinfo.ram_start, kinfo.ram_end);xen/arch/arm/p2m.c +1
-1@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)void *p;/* First level P2M is 2 consecutive pages */ - page =alloc_domheap_pages (d,1 ,0 ); + page =alloc_domheap_pages (NULL ,1 ,0 );if ( page ==NULL )return -ENOMEM ;Signature · 7 lines
1.7.2.5 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel