aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/x86_64
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-06-15 20:24:09 +0100
committerJan Beulich <jbeulich@novell.com>2011-06-15 20:24:09 +0100
commited6229185f3a47d14e35d8f767aab0d01f7ffcaa (patch)
treeff283453b5abcc8f8564c08f275ff73b78e9ec6f /xen/include/asm-x86/x86_64
parent2de77fa3cdbc08f76942db9bcf38dc6885cb4786 (diff)
downloadxen-ed6229185f3a47d14e35d8f767aab0d01f7ffcaa.tar.gz
xen-ed6229185f3a47d14e35d8f767aab0d01f7ffcaa.tar.bz2
xen-ed6229185f3a47d14e35d8f767aab0d01f7ffcaa.zip
x86-64: fix incorrect assertion in __maddr_to_virt()
When memory map sparseness reduction is in use, machine address ranges can't validly be compared directly against the total size of the direct mapping range. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/x86_64')
-rw-r--r--xen/include/asm-x86/x86_64/page.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/include/asm-x86/x86_64/page.h b/xen/include/asm-x86/x86_64/page.h
index d146e992e8..fc006f4456 100644
--- a/xen/include/asm-x86/x86_64/page.h
+++ b/xen/include/asm-x86/x86_64/page.h
@@ -96,7 +96,7 @@ static inline unsigned long __virt_to_maddr(unsigned long va)
static inline void *__maddr_to_virt(unsigned long ma)
{
- ASSERT(ma < DIRECTMAP_VIRT_END - DIRECTMAP_VIRT_START);
+ ASSERT(pfn_to_pdx(ma >> PAGE_SHIFT) < (DIRECTMAP_SIZE >> PAGE_SHIFT));
return (void *)(DIRECTMAP_VIRT_START +
((ma & ma_va_bottom_mask) |
((ma & ma_top_mask) >> pfn_pdx_hole_shift)));