[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] Revert "xen/arm: fix mask calculation in pdx_init_mask"



commit 85fd4f7a09d8aaa783932b8c15b80ddaff0a174d
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Mon Jun 24 11:04:51 2019 +0100
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Mon Jun 24 11:04:51 2019 +0100

    Revert "xen/arm: fix mask calculation in pdx_init_mask"
    
    This reverts commit 11911563610786615c2b3a01cdcaaf09a6f9e38d. It breaks
    boot on AMD Seattle (laxton{0,1} in osstest).
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/arch/arm/setup.c | 9 +--------
 xen/common/pdx.c     | 7 +------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 215746a5c3..d5d188a105 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -484,14 +484,7 @@ static void __init init_pdx(void)
 {
     paddr_t bank_start, bank_size, bank_end;
 
-    /*
-     * Arm does not have any restrictions on the bits to compress. Pass 0 to
-     * let the common code further restrict the mask.
-     *
-     * If the logic changes in pfn_pdx_hole_setup we might have to
-     * update this function too.
-     */
-    uint64_t mask = pdx_init_mask(0x0);
+    uint64_t mask = pdx_init_mask(bootinfo.mem.bank[0].start);
     int bank;
 
     for ( bank = 0 ; bank < bootinfo.mem.nr_banks; bank++ )
diff --git a/xen/common/pdx.c b/xen/common/pdx.c
index c91875fabe..8356f03ce8 100644
--- a/xen/common/pdx.c
+++ b/xen/common/pdx.c
@@ -50,11 +50,9 @@ static u64 __init fill_mask(u64 mask)
     return mask;
 }
 
-/* We don't want to compress the low MAX_ORDER bits of the addresses. */
 uint64_t __init pdx_init_mask(uint64_t base_addr)
 {
-    return fill_mask(max(base_addr,
-                         (uint64_t)1 << (MAX_ORDER + PAGE_SHIFT)) - 1);
+    return fill_mask(base_addr - 1);
 }
 
 u64 __init pdx_region_mask(u64 base, u64 len)
@@ -82,9 +80,6 @@ void __init pfn_pdx_hole_setup(unsigned long mask)
      * This guarantees that page-pointer arithmetic remains valid within
      * contiguous aligned ranges of 2^MAX_ORDER pages. Among others, our
      * buddy allocator relies on this assumption.
-     *
-     * If the logic changes here, we might have to update the ARM specific
-     * init_pdx too.
      */
     for ( j = MAX_ORDER-1; ; )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.