From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH 01/04] p2m: use defines for page sizes rather hardcoding them Date: Fri, 26 Aug 2011 16:45:24 +0200 Message-ID: <4E57B184.8070601@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050803060504010401060504" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" , Tim Deegan List-Id: xen-devel@lists.xenproject.org --------------050803060504010401060504 Content-Type: text/plain; charset="ISO-8859-15"; format=flowed Content-Transfer-Encoding: 7bit Contains pieces I missed in previous patch. Sorry. -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --------------050803060504010401060504 Content-Type: text/plain; name="xen_superpage1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_superpage1.diff" Content-Description: xen_superpage1.diff 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; --------------050803060504010401060504 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------050803060504010401060504--