use defines for page sizes rather hardcoding them. Signed-off-by: Christoph Egger diff -r 8a4fd41c18d9 -r ec93fa9caebb xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -881,7 +881,7 @@ void p2m_mem_access_check(unsigned long if ( access_w && p2ma == p2m_access_rx2rw ) { - p2m->set_entry(p2m, gfn, mfn, 0, p2mt, p2m_access_rw); + p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2mt, p2m_access_rw); p2m_unlock(p2m); return; } @@ -904,7 +904,7 @@ void p2m_mem_access_check(unsigned long { /* A listener is not required, so clear the access restrictions */ p2m_lock(p2m); - p2m->set_entry(p2m, gfn, mfn, 0, p2mt, p2m_access_rwx); + p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2mt, p2m_access_rwx); p2m_unlock(p2m); } @@ -996,7 +996,7 @@ int p2m_set_mem_access(struct domain *d, for ( pfn = start_pfn; pfn < start_pfn + nr; pfn++ ) { mfn = gfn_to_mfn_query(d, pfn, &t); - if ( p2m->set_entry(p2m, pfn, mfn, 0, t, a) == 0 ) + if ( p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a) == 0 ) { rc = -ENOMEM; break;