From: "Jan Beulich" Subject: [PATCH] linux: Fix backward compatibility in page table handling Date: Mon, 26 Feb 2007 14:02:34 +0000 Message-ID: <45E2F68A.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline 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 List-Id: xen-devel@lists.xenproject.org A 3.0.2 compatibility requirement slipped my attention before submitting the original page table handling changes. Signed-off-by: Jan Beulich Index: sle10sp1-2007-02-20/include/asm-i386/mach-xen/asm/page.h =================================================================== --- sle10sp1-2007-02-20.orig/include/asm-i386/mach-xen/asm/page.h 2007-02-26 10:23:57.000000000 +0100 +++ sle10sp1-2007-02-20/include/asm-i386/mach-xen/asm/page.h 2007-02-26 10:26:14.000000000 +0100 @@ -139,7 +139,11 @@ static inline unsigned long pgd_val(pgd_t x) { unsigned long ret = x.pgd; +#ifdef CONFIG_XEN_COMPAT_030002 + if (ret) ret = machine_to_phys(ret) | _PAGE_PRESENT; +#else if (ret & _PAGE_PRESENT) ret = machine_to_phys(ret); +#endif return ret; } #define HPAGE_SHIFT 22