diff mbox

[Xen-devel] Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"

Message ID 1396440267.8667.327.camel@kazak.uk.xensource.com
State Accepted
Commit 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd
Headers show

Commit Message

Ian Campbell April 2, 2014, 12:04 p.m. UTC
On Mon, 2014-01-27 at 14:06 +0000, Ian Campbell wrote:
> On Fri, 2014-01-24 at 17:11 +0000, Julien Grall wrote:
> > On 01/14/2014 10:51 AM, Ian Campbell wrote:
> > > I think this problem is now fixed upstream, the intention was to
> > > eventually revert the workaround (Julien was going to tell me when it
> > > had gone into stable etc, but this is now a 4.5 era revert candidate).
> > 
> > The patch was merged for 3.13.
> 
> Thanks. I don't think we can revert for 4.4 now, but lets revisit for
> 4.5.

So should we revert

        commit 6c21cb36e263de2db8716b477157a5b6cd531e1e
        Author: Julien Grall <julien.grall@linaro.org>
        Date:   Tue Oct 22 11:51:48 2013 +0100
        
            xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround

Now?

------8<----------------

From 2e688b06954663f8ff7bc72e5bcf6a823090af9a Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Wed, 2 Apr 2014 13:03:36 +0100
Subject: [PATCH] Revert "xen/arm: Allocate memory for dom0 from the bottom
 with the 1:1 Workaround"

This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.

The Linux = issue which this works around was fixed in v3.13.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

Comments

Julien Grall April 2, 2014, 12:07 p.m. UTC | #1
On 04/02/2014 01:04 PM, Ian Campbell wrote:
> On Mon, 2014-01-27 at 14:06 +0000, Ian Campbell wrote:
>> On Fri, 2014-01-24 at 17:11 +0000, Julien Grall wrote:
>>> On 01/14/2014 10:51 AM, Ian Campbell wrote:
>>>> I think this problem is now fixed upstream, the intention was to
>>>> eventually revert the workaround (Julien was going to tell me when it
>>>> had gone into stable etc, but this is now a 4.5 era revert candidate).
>>>
>>> The patch was merged for 3.13.
>>
>> Thanks. I don't think we can revert for 4.4 now, but lets revisit for
>> 4.5.
> 
> So should we revert
> 
>         commit 6c21cb36e263de2db8716b477157a5b6cd531e1e
>         Author: Julien Grall <julien.grall@linaro.org>
>         Date:   Tue Oct 22 11:51:48 2013 +0100
>         
>             xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround
> 
> Now?

Sorry, I completely forgot this stuff. Let me try on the arndale with
this patch.

Regards,
Julien Grall April 2, 2014, 1:21 p.m. UTC | #2
On 04/02/2014 01:04 PM, Ian Campbell wrote:
> On Mon, 2014-01-27 at 14:06 +0000, Ian Campbell wrote:
>> On Fri, 2014-01-24 at 17:11 +0000, Julien Grall wrote:
>>> On 01/14/2014 10:51 AM, Ian Campbell wrote:
>>>> I think this problem is now fixed upstream, the intention was to
>>>> eventually revert the workaround (Julien was going to tell me when it
>>>> had gone into stable etc, but this is now a 4.5 era revert candidate).
>>>
>>> The patch was merged for 3.13.
>>
>> Thanks. I don't think we can revert for 4.4 now, but lets revisit for
>> 4.5.
> 
> So should we revert
> 
>         commit 6c21cb36e263de2db8716b477157a5b6cd531e1e
>         Author: Julien Grall <julien.grall@linaro.org>
>         Date:   Tue Oct 22 11:51:48 2013 +0100
>         
>             xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround
> 
> Now?

Reverting this commit doesn't change anything in the memory allocation.
I'm sure why...

Anyway it works on the arndale! I will have to update the wiki page (the
instructions are for Linux 3.10).

> ------8<----------------
> 
> From 2e688b06954663f8ff7bc72e5bcf6a823090af9a Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Wed, 2 Apr 2014 13:03:36 +0100
> Subject: [PATCH] Revert "xen/arm: Allocate memory for dom0 from the bottom
>  with the 1:1 Workaround"
> 
> This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.
> 
> The Linux = issue which this works around was fixed in v3.13.

Linux commit: f52bb722547f43caeaecbcc62db9f3c3b80ead9b "ARM: mm: Correct
virt_to_phys patching for 64 bit physical addresses"

With the commit mentioned:
Acked-by: Julien Grall <julien.grall@linaro.org>

Regards,
Ian Campbell April 3, 2014, 4:30 p.m. UTC | #3
On Wed, 2014-04-02 at 14:21 +0100, Julien Grall wrote:

> Linux commit: f52bb722547f43caeaecbcc62db9f3c3b80ead9b "ARM: mm: Correct
> virt_to_phys patching for 64 bit physical addresses"
> 
> With the commit mentioned:

Done and applied, thanks.

> Acked-by: Julien Grall <julien.grall@linaro.org>
> 
> Regards,
>
diff mbox

Patch

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 502db84..a0b73d2 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,19 +69,12 @@  static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg = NULL;
+    struct page_info *pg;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
-    unsigned int bits;
-
-    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
-    {
-        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
-        if ( pg != NULL )
-            break;
-    }
 
+    pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");