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-changelog

[Xen-changelog] [xen-unstable] hvm: Fix max_mapped_pfn when using 2MB su

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: Fix max_mapped_pfn when using 2MB super pages.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2008 14:10:31 -0700
Delivery-date: Fri, 13 Jun 2008 14:11:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213347409 -3600
# Node ID 02b6977de4b5bcc173183e3f4aa836cd36f76160
# Parent  8a0415fac759d0336107b0917b45c1dd9a55755d
hvm: Fix max_mapped_pfn when using 2MB super pages.

Fixes booting Linux guest allocated more than 4G memory.
  - The p2m table will track the max_mapped_pfn, and while doing
    p2m_gfn_to_mfn(), if the gfn is higher than max_mapped_pfn, the
    function will return _mfn(INVALID_MFN). This makes the Linux guest
    kernel panic.

Signed-off-by: Xu Dongxiao <dongxiao.xu@xxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 8a0415fac759 -r 02b6977de4b5 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Fri Jun 13 09:54:03 2008 +0100
+++ b/xen/arch/x86/mm/p2m.c     Fri Jun 13 09:56:49 2008 +0100
@@ -323,7 +323,7 @@ p2m_set_entry(struct domain *d, unsigned
 
     /* Track the highest gfn for which we have ever had a valid mapping */
     if ( mfn_valid(mfn) && (gfn > d->arch.p2m->max_mapped_pfn) )
-        d->arch.p2m->max_mapped_pfn = gfn;
+        d->arch.p2m->max_mapped_pfn = gfn + (1UL << page_order) - 1;
 
     if ( iommu_enabled && (is_hvm_domain(d) || need_iommu(d)) )
     {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvm: Fix max_mapped_pfn when using 2MB super pages., Xen patchbot-unstable <=