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

Re: [Xen-devel] Errors with Loading Xen at a Certain Address


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Brian Woods <brian.woods@xxxxxxxxxx>
  • Date: Wed, 2 Oct 2019 11:56:17 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=epam.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iiwWArnwvtWAZWyAgdgE7nuSwKP+8tlLfW5A4efP/Vg=; b=YlBYyURooFYJYrpGQ2v69zYdqTAMuTpXaitRz7h5D4IkyyoZYct0kQWGXK5ih8FmnG4/QVbicqliBh7jyYXQiEPzbtJSf+A/+d4sZO44BCcesW/4RRkw0PVUZDSj035qSDpyKCEjQgxv4aJjUHLc3IR8VJe8ZZLKDw1ddNPJAyhv234JKKx9hf41ZKY+z6g1SNE5gwwozUB6DKFpxFk4DHFCReMF6kr5nBZMiYHyjtU4k8/eVfwxosvrn2nF8tD3oUVvA/G0ZIrwzY41PXjb7/5iWTLaDotLV3jGWC3VszQWOMG1VxLKYpC6R7LRTakyXfir2koL4VSSeTr+TMOIiQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g6MWjSoEq3iAITdtTNz0pXtCZRQ3BMEw5lNQQmBofUDoO8aj8F+Jev8Sao133Patz/VB/pmHuoyQ0kM7dJFaYqJ3y1mEMQF8ehdcTF3XUMdvzvzNgWPPqv2hNjf/0qgkQciXlM6UV+aXZ7uiXWeedG7zG0wPWAW3TXj7GqAxui6Zrj4BW0Y+PczA1WqidgRrYyWVEWqKj5cX+sHWAnovHWyb7M1gzP3ACvdo0ES7yvTs+H65g0v5ZfbAGEcCsZPmlTOCLc5cgU50avRWgDIImTzfZAe6R47UYY1wkZTDBFbPUNPQCnDgLWD82p2JXt0IX09p7cySFZhkxOeRUo3Udw==
  • Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; epam.com; dkim=none (message not signed) header.d=none;epam.com; dmarc=bestguesspass action=none header.from=xilinx.com;
  • Cc: Brian Woods <brian.woods@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 02 Oct 2019 18:57:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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...)?
>

I did include all the ARM maintainers, although I forgot to CC
Volodymyr.  Sorry about that.  Also, I'm not sure if this is strictly an
ARM or general Xen bug so I left ARM.  I guess I should have mentioned
that in the email though.

I prefer having them as attachments due to the fact I can see everything
in mutt. Although if there's a strong community consensus that logs
shouldn't be emailed as attachments, I will start using a pastebin like
service to post them.

>>
>>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@xxxxxxx>
>>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

Attached are the logs of loading patched Xen at the good and bad
address.  It appears the MFN has stayed the same, although there's only
one WARN message for both the good and bad address.

-- 
Brian Woods

Attachment: xen-git_52633db2c5ed-patched-good_addr.log
Description: Text document

Attachment: xen-git_52633db2c5ed-patched-bad_addr.log
Description: Text document

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

 


Rackspace

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