Backport to Xen 2
Modified: branches/xen/reactos/boot/freeldr/freeldr/arch/i386/xenmem.c

Modified: branches/xen/reactos/boot/freeldr/freeldr/arch/i386/xenmem.c
--- branches/xen/reactos/boot/freeldr/freeldr/arch/i386/xenmem.c	2005-05-20 10:33:27 UTC (rev 15430)
+++ branches/xen/reactos/boot/freeldr/freeldr/arch/i386/xenmem.c	2005-05-20 10:55:55 UTC (rev 15431)
@@ -448,7 +448,11 @@
 VOID
 XenMemInstallPageDir(PPAGE_DIRECTORY_X86 NewPageDir)
 {
+#if 2 == XEN_VER
+  mmu_update_t MmuReq;
+#else /* XEN_VER */
   struct mmuext_op MmuExtReq;
+#endif /* XEN_VER */
   ULONG NewPageDirMfn;
   ULONG PageIndex;
 
@@ -487,9 +491,15 @@
     }
 
   /* Set the PDBR */
+#if 2 == XEN_VER
+  MmuReq.ptr = (NewPageDirMfn << PFN_SHIFT) | MMU_EXTENDED_COMMAND;
+  MmuReq.val = MMUEXT_NEW_BASEPTR;
+  if (0 != XEN_MMU_UPDATE(&MmuReq, 1, NULL, DOMID_SELF))
+#else /* XEN_VER */
   MmuExtReq.cmd = MMUEXT_NEW_BASEPTR;
   MmuExtReq.mfn = NewPageDirMfn;
   if (0 != HYPERVISOR_mmuext_op(&MmuExtReq, 1, NULL, DOMID_SELF))
+#endif /* XEN_VER */
     {
       printf("Failed to set new page dir\n");
       XenDie();