All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Brian Woods <brian.woods@xilinx.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] Errors with Loading Xen at a Certain Address
Date: Wed, 2 Oct 2019 17:52:56 +0100	[thread overview]
Message-ID: <b02aeec5-b90f-d330-a504-0ab0e6ff86c9@arm.com> (raw)
In-Reply-To: <48c9fc54-553e-3b6b-bad2-dbad35991df0@arm.com>

Sorry I forgot to CC xen-devel back.

On 10/2/19 5:52 PM, Julien Grall wrote:
> On 10/2/19 1:32 AM, Brian Woods wrote:
>> Hello,
> 
> Hi Brian,
> 
> Thank you for report.
> 
> I guess this Arm specific, right? If so, please try to CC
> the relevant maintainers and possibly add "arm" in the
> subject to avoid any delay (Xen-Devel has quite an high
> volume of e-mail!).
> 
> May I also ask to avoiding sending attachment on the mailing
> list and  instead upload the log somewhere (e.g. pastebin,
> your own webserver...)?
> 
>>
>> While testing some things out, I found a possible bug in Xen.  Xen would
>> successfully run when loaded (from u-boot) at some addresses but not
>> others.  I didn't observe this issue in 4.11 stable, so I did a bisect
>> and found that:
>> commit f60658c6ae47e74792e6cc48ea2effac8bb52826
>> Author: Julien Grall <julien.grall@arm.com>
>> Date:   Tue Dec 18 13:07:39 2018 +0000
>>
>>       xen/arm: Stop relocating Xen
>>
>> was what was causing it to fail when it was loaded to that certain
>> address.
> 
> This patch is basically changing how Xen is using the
> physical address space. So it exercise more part of Xen
> code and most likely a red-herring :).
> 
> However, the logs are quite interesting:
> 
> (XEN) pg[0] MFN 01533 c=0x180000000000000 o=0 v=0x7ffff t=0
> 
> If I am not mistaken, the page state is PGC_state_free.
> So this seems to suggest that the page were already
> handed over to the allocator.
> 
> Would you mind to apply the patch below and paste the log?
> 
> Hopefully, you see see two WARN_ON() before Xen is crashing.
> 
> Note the patch is assuming the MFN will stay the same after
> the patch has been applied. If not, you may need to slightly
> tweak it.
> 
> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> index 7cb1bd368b..4bf0dbc727 100644
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -1389,6 +1389,9 @@ static void free_heap_pages(
>   
>       for ( i = 0; i < (1 << order); i++ )
>       {
> +
> +        WARN_ON(mfn_x(page_to_mfn(pg + 1)) == 0x01533);
> +
>           /*
>            * Cannot assume that count_info == 0, as there are some corner cases
>            * where it isn't the case and yet it isn't a bug:
> 
> Cheers,
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-10-02 16:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02  0:32 [Xen-devel] Errors with Loading Xen at a Certain Address Brian Woods
     [not found] ` <48c9fc54-553e-3b6b-bad2-dbad35991df0@arm.com>
2019-10-02 16:52   ` Julien Grall [this message]
2019-10-02 18:56     ` Brian Woods
2019-10-02 19:59       ` Julien Grall
2019-10-02 21:22         ` Brian Woods
2019-10-02 23:20           ` Brian Woods
2019-10-03 17:08             ` Julien Grall
2019-10-03 18:15               ` Brian Woods
2019-10-03 19:23                 ` Julien Grall
2019-10-03 20:24                   ` Brian Woods
2019-10-03 21:20                     ` Julien Grall
2019-10-04  0:25                       ` Brian Woods
2019-10-04  9:49                         ` Julien Grall
2019-10-04 15:36                           ` Brian Woods

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b02aeec5-b90f-d330-a504-0ab0e6ff86c9@arm.com \
    --to=julien.grall@arm.com \
    --cc=brian.woods@xilinx.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.