Lines Matching refs:pg
136 #define page_to_mfn(pg) _mfn(__page_to_mfn(pg))
641 static bool inc_linear_entries(struct page_info *pg)
643 typeof(pg->linear_pt_count) nc = read_atomic(&pg->linear_pt_count), oc;
658 nc = cmpxchg(&pg->linear_pt_count, oc, nc);
664 static void dec_linear_entries(struct page_info *pg)
666 typeof(pg->linear_pt_count) oc;
668 oc = arch_fetch_and_add(&pg->linear_pt_count, -1);
672 static bool inc_linear_uses(struct page_info *pg)
674 typeof(pg->linear_pt_count) nc = read_atomic(&pg->linear_pt_count), oc;
682 nc = cmpxchg(&pg->linear_pt_count, oc, nc);
688 static void dec_linear_uses(struct page_info *pg)
690 typeof(pg->linear_pt_count) oc;
692 oc = arch_fetch_and_add(&pg->linear_pt_count, 1);
794 static void dec_linear_uses(struct page_info *pg)
796 ASSERT(pg->linear_pt_count == 0);
799 static void dec_linear_entries(struct page_info *pg)
801 ASSERT(pg->linear_pt_count == 0);
1278 struct page_info *pg = l2e_get_page(l2e);
1279 int rc = _put_page_type(pg, false, mfn_to_page(_mfn(pfn)));
1282 put_page(pg);
1291 struct page_info *pg;
1310 pg = l3e_get_page(l3e);
1315 return _put_page_type(pg, true, mfn_to_page(_mfn(pfn)));
1321 current->arch.old_guest_table = pg;
1325 rc = _put_page_type(pg, true, mfn_to_page(_mfn(pfn)));
1327 put_page(pg);
1340 struct page_info *pg = l4e_get_page(l4e);
1345 return _put_page_type(pg, true, mfn_to_page(_mfn(pfn)));
1351 current->arch.old_guest_table = pg;
1355 rc = _put_page_type(pg, true, mfn_to_page(_mfn(pfn)));
1357 put_page(pg);
5251 struct page_info *pg;
5262 pg = alloc_domheap_page(d, MEMF_no_owner);
5263 if ( !pg )
5265 l3tab = __map_domain_page(pg);
5267 d->arch.perdomain_l3_pg = pg;
5283 pg = alloc_domheap_page(d, MEMF_no_owner);
5284 if ( !pg )
5289 l2tab = __map_domain_page(pg);
5291 l3tab[l3_table_offset(va)] = l3e_from_page(pg, __PAGE_HYPERVISOR_RW);
5320 pg = virt_to_page(l1tab);
5324 pg = alloc_domheap_page(d, MEMF_no_owner);
5325 if ( !pg )
5330 l1tab = __map_domain_page(pg);
5333 *pl2e = l2e_from_page(pg, __PAGE_HYPERVISOR_RW);
5341 pg = alloc_domheap_page(d, MEMF_no_owner);
5342 if ( pg )
5344 clear_domain_page(page_to_mfn(pg));
5346 *ppg++ = pg;
5348 l1e_from_page(pg, __PAGE_HYPERVISOR_RW | _PAGE_AVAIL0);