Use __get_gfn_type_access instead of p2m->get_entry to trigger page-forking
when the mem_access permission is being set on a page that has not yet been
copied over from the parent.
Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
ASSERT(!ap2m);
#endif
{
- mfn_t mfn;
p2m_access_t _a;
p2m_type_t t;
-
- mfn = p2m->get_entry(p2m, gfn, &t, &_a, 0, NULL, NULL);
+ mfn_t mfn = __get_gfn_type_access(p2m, gfn_x(gfn), &t, &_a,
+ P2M_ALLOC, NULL, false);
rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, t, a, -1);
}