|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: arm: correctly round down MFN to 1GB boundary make sure pagetable mask macros as physaddr size
commit 80a7e7eaa177af948b1f4cc954bf2d39ee182724
Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Thu Oct 10 15:43:44 2013 +0100
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Oct 24 14:24:37 2013 +0100
xen: arm: correctly round down MFN to 1GB boundary make sure pagetable mask
macros as physaddr size
~FIRST_MASK is nothing like correct for rounding down an MFN. It is the
inverse *and* an address not a framenumber so wrong in every dimension! We
cannot use FIRST_MASK since that would mask off any zeroeth level bits.
Instead calculate the correct value from FIRST_SIZE.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
xen/arch/arm/mm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 1773ffe..123280e 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -639,7 +639,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn,
end_mfn = base_mfn + nr_mfns;
/* Align to previous 1GB boundary */
- base_mfn &= ~FIRST_MASK;
+ base_mfn &= ~((FIRST_SIZE>>PAGE_SHIFT)-1);
offset = base_mfn - xenheap_mfn_start;
vaddr = DIRECTMAP_VIRT_START + offset*PAGE_SIZE;
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |