@@ -1112,9 +1112,8 @@ int guest_physmap_remove_page(struct domain *d, gfn_t gfn, mfn_t mfn,
return p2m_remove_mapping(d, gfn, (1 << page_order), mfn);
}
-static int p2m_alloc_table(struct domain *d)
+static int p2m_alloc_table(struct p2m_domain *p2m)
{
- struct p2m_domain *p2m = p2m_get_hostp2m(d);
struct page_info *page;
unsigned int i;
@@ -1290,7 +1289,7 @@ int p2m_init_one(struct domain *d, struct p2m_domain *p2m)
p2m->clean_pte = iommu_enabled &&
!iommu_has_feature(d, IOMMU_FEAT_COHERENT_WALK);
- rc = p2m_alloc_table(d);
+ rc = p2m_alloc_table(p2m);
/*
* Make sure that the type chosen to is able to store the an vCPU ID