diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-06-15 20:45:54 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-06-15 20:45:54 +0100 |
commit | 34a30849594308de73bc76d58f2cc4c6660efd32 (patch) | |
tree | 80f7e2d2ac727084fc28d733129277fc0b11eed9 | |
parent | 1691312bb75d23dba4cdaeac4b49aa4b10d31d27 (diff) | |
download | xen-34a30849594308de73bc76d58f2cc4c6660efd32.tar.gz xen-34a30849594308de73bc76d58f2cc4c6660efd32.tar.bz2 xen-34a30849594308de73bc76d58f2cc4c6660efd32.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>
xen-unstable changeset: 23543:a8edfacd4b5e
xen-unstable date: Wed Jun 15 20:24:09 2011 +0100
-rw-r--r-- | xen/include/asm-x86/x86_64/page.h | 2 |
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 8e58c9b9eb..00229f0867 100644 --- a/xen/include/asm-x86/x86_64/page.h +++ b/xen/include/asm-x86/x86_64/page.h @@ -95,7 +95,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))); |