From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re: [PATCH 2/2] linux/x86: use shared page indicating the need for an EOI notification) Date: Wed, 10 Dec 2008 07:59:14 +0000 Message-ID: <493F84E2.76E4.0078.0@novell.com> References: <493D30D6.76E4.0078.0@novell.com> <20081209034038.GO5454%yamahata@valinux.co.jp> <493E50D7.76E4.0078.0@novell.com> <20081209104310.GR5454%yamahata@valinux.co.jp> <493E5C91.76E4.0078.0@novell.com> <20081210040936.GE15447%yamahata@valinux.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20081210040936.GE15447%yamahata@valinux.co.jp> 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: Isaku Yamahata Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> Isaku Yamahata 10.12.08 05:09 >>> >Like this? Almost. >--- a/include/asm-i386/mach-xen/asm/pgtable.h >+++ b/include/asm-i386/mach-xen/asm/pgtable.h >@@ -488,6 +488,17 @@ void make_pages_writable(void *va, unsig > (((maddr_t)pte_mfn(*virt_to_ptep(va)) << PAGE_SHIFT) \ > | ((unsigned long)(va) & (PAGE_SIZE - 1))) >=20 >+#ifdef CONFIG_HIGHPTE >+#define ptep_to_machine(ptep) \ >+({ \ >+ (unsigned long)(ptep) >=3D (unsigned long)high_memory? \ >+ arbitrary_virt_to_machine(ptep) : \ >+ virt_to_machine(ptep); \ >+}) I was intending to make use of kmap_atomic_to_page() here. Due to the check at the beginning of that function, it would even be possible to get away without a conditional in the highpte case of the macro: #define ptep_to_machine(ptep) page_to_phys(kmap_atomic_to_page(ptep)) page_to_phys() and page_to_bus() could be used here interchangeably due to them being identical on x86. Jan