From: "Jan Beulich" Subject: [PATCH] linux/x86-64: use xen_new_user_pt() rather than open-coding it Date: Fri, 08 Aug 2008 13:23:46 +0100 Message-ID: <489C56F2.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 As usual, written and tested on 2.6.26 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2008-08-07/drivers/xen/core/machine_reboot.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-08-07.orig/drivers/xen/core/machine_reboot.c 2008-08-07 = 12:44:36.000000000 +0200 +++ head-2008-08-07/drivers/xen/core/machine_reboot.c 2008-08-07 = 13:59:00.000000000 +0200 @@ -184,14 +184,8 @@ static int take_machine_down(void *_susp * We do it here just in case, but there's no need if we = are * in fast-suspend mode as that implies a new enough Xen. */ - if (!suspend->fast_suspend) { - struct mmuext_op op; - op.cmd =3D MMUEXT_NEW_USER_BASEPTR; - op.arg1.mfn =3D pfn_to_mfn(__pa(__user_pgd( - current->active_mm->pgd)) >> PAGE_SHIFT); - if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))= - BUG(); - } + if (!suspend->fast_suspend) + xen_new_user_pt(__pa(__user_pgd(current->active_mm-= >pgd)); #endif } time_resume();