debuggers.hg
changeset 17886:02b6977de4b5
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@intel.com>
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@intel.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Jun 13 09:56:49 2008 +0100 (2008-06-13) |
parents | 8a0415fac759 |
children | cb514522dab2 |
files | xen/arch/x86/mm/p2m.c |
line diff
1.1 --- a/xen/arch/x86/mm/p2m.c Fri Jun 13 09:54:03 2008 +0100 1.2 +++ b/xen/arch/x86/mm/p2m.c Fri Jun 13 09:56:49 2008 +0100 1.3 @@ -323,7 +323,7 @@ p2m_set_entry(struct domain *d, unsigned 1.4 1.5 /* Track the highest gfn for which we have ever had a valid mapping */ 1.6 if ( mfn_valid(mfn) && (gfn > d->arch.p2m->max_mapped_pfn) ) 1.7 - d->arch.p2m->max_mapped_pfn = gfn; 1.8 + d->arch.p2m->max_mapped_pfn = gfn + (1UL << page_order) - 1; 1.9 1.10 if ( iommu_enabled && (is_hvm_domain(d) || need_iommu(d)) ) 1.11 {