WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] PV-GRUB fix

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] PV-GRUB fix
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Fri, 20 Jun 2008 17:33:25 +0100
Delivery-date: Fri, 20 Jun 2008 09:33:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
I forgot one hook in the PV-GRUB patch, here is the missing part.



minios: do not systematically free the page under shared info, as the
guest booted by PV-GRUB will need it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 3da148fb7d9b extras/mini-os/arch/x86/mm.c
--- a/extras/mini-os/arch/x86/mm.c      Thu Jun 19 11:09:10 2008 +0100
+++ b/extras/mini-os/arch/x86/mm.c      Thu Jun 19 11:59:42 2008 +0100
@@ -528,18 +528,13 @@
 
 static void clear_bootstrap(void)
 {
-    xen_pfn_t mfns[] = { virt_to_mfn(&shared_info) };
-    int n = sizeof(mfns)/sizeof(*mfns);
     pte_t nullpte = { };
 
     /* Use first page as the CoW zero page */
     memset(&_text, 0, PAGE_SIZE);
-    mfn_zero = pfn_to_mfn((unsigned long) &_text);
-    if (HYPERVISOR_update_va_mapping((unsigned long) &_text, nullpte, 
UVMF_INVLPG))
-       printk("Unable to unmap first page\n");
-
-    if (free_physical_pages(mfns, n) != n)
-       printk("Unable to free bootstrap pages\n");
+    mfn_zero = virt_to_mfn((unsigned long) &_text);
+    if (HYPERVISOR_update_va_mapping(0, nullpte, UVMF_INVLPG))
+       printk("Unable to unmap NULL page\n");
 }
 
 void arch_init_p2m(unsigned long max_pfn)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] PV-GRUB fix, Samuel Thibault <=