diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-04 12:33:14 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-04 12:33:14 +0100 |
commit | 9b07822c1a8b18a75bdacc9c8bb3667cd994b329 (patch) | |
tree | d06de471288de83cd011e5ebba3781f6026eb24b | |
parent | d640a290f281704d8375ef388da53dbca9c1d248 (diff) | |
download | xen-9b07822c1a8b18a75bdacc9c8bb3667cd994b329.tar.gz xen-9b07822c1a8b18a75bdacc9c8bb3667cd994b329.tar.bz2 xen-9b07822c1a8b18a75bdacc9c8bb3667cd994b329.zip |
p2m_alloc_table: use p2m_alloc_ptp
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
-rw-r--r-- | xen/arch/x86/mm/p2m.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 916fdc2de8..df7d803811 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1814,22 +1814,19 @@ int p2m_alloc_table(struct domain *d, p2m->alloc_page = alloc_page; p2m->free_page = free_page; - p2m_top = p2m->alloc_page(d); - if ( p2m_top == NULL ) - { - p2m_unlock(p2m); - return -ENOMEM; - } - page_list_add_tail(p2m_top, &p2m->pages); - - p2m_top->count_info = 1; - p2m_top->u.inuse.type_info = + p2m_top = p2m_alloc_ptp(d, #if CONFIG_PAGING_LEVELS == 4 PGT_l4_page_table #else PGT_l3_page_table #endif - | 1 | PGT_validated; + ); + + if ( p2m_top == NULL ) + { + p2m_unlock(p2m); + return -ENOMEM; + } d->arch.phys_table = pagetable_from_mfn(page_to_mfn(p2m_top)); |