From patchwork Wed Jun 7 11:06:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 9771309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0F40460364 for ; Wed, 7 Jun 2017 11:08:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 062442849E for ; Wed, 7 Jun 2017 11:08:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8E6D284A6; Wed, 7 Jun 2017 11:08:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 547F727F10 for ; Wed, 7 Jun 2017 11:08:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIYnO-0004YZ-6C; Wed, 07 Jun 2017 11:06:38 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIYnM-0004YT-UW for xen-devel@lists.xenproject.org; Wed, 07 Jun 2017 11:06:37 +0000 Received: from [193.109.254.147] by server-5.bemta-6.messagelabs.com id 19/0E-03371-C3ED7395; Wed, 07 Jun 2017 11:06:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphleJIrShJLcpLzFFi42LZKekooWt9zzz SoPWXlsX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvHv8AXGguMKFTdmv2JpYJyg0MXIySEh4Cfx 9vI2FhCbTUBHYunR+UxdjFwcIgKzGSXaT19gB3GYBQ4yShyddp8ZpEpYwEXi/6HFbCC2iICrx LfTXYwQdp7EzN8tYHEWARWJS5sesYPYvALuEnuWgNRzcQgJvGCRuH5xP9ggTgEPid87F4CtZh SQlfjSuBosziwgLnHrCcgZIOcJSCzZc54ZwhaVePn4HyuEbSCxdek+oF4OoHpNifW79CFaFSW mdD+E2isocXLmE5YJjMKzkEydhdAxC0nHLCQdCxhZVjFqFKcWlaUW6RpZ6CUVZaZnlOQmZubo GhqY6eWmFhcnpqfmJCYV6yXn525iBIY/AxDsYDy/NvAQoyQHk5Iob8FN80ghvqT8lMqMxOKM+ KLSnNTiQ4waHBwCm9euvsAoxZKXn5eqJMErfheoTrAoNT21Ii0zBxihMKUSHDxKIrxbbgOleY sLEnOLM9MhUqcYjTk2rF7/hYnjTt+GL0xCYJOkxHn/3wEqFQApzSjNgxsESxyXGGWlhHkZgc4 U4ilILcrNLEGVf8UozsGoJMxrAnIPT2ZeCdy+V0CnMAGdwnfJBOSUkkSElFQDo4WW8sddfdGF Tm/E65dXrfs1m/XY3YC/JuLLOjsV1Wdpm592//2ple3pvpO/vNQ3REm3tdXVLWE/KRvZuf3dz 42CbCfZF87Pnca9p4SPn/F9JbMi99yV+1af3zdLK7M/b/HWf0uvXHL5rq4mn3FVvv6on/2pc5 3vE9duF1NvLZjXxLQur7xcRYmlOCPRUIu5qDgRAIqR60QXAwAA X-Env-Sender: prvs=324d18410=Paul.Durrant@citrix.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1496833595!83273500!1 X-Originating-IP: [185.25.65.24] X-SpamReason: No, hits=0.0 required=7.0 tests=received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24113 invoked from network); 7 Jun 2017 11:06:35 -0000 Received: from smtp.ctxuk.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-10.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 7 Jun 2017 11:06:35 -0000 X-IronPort-AV: E=Sophos;i="5.39,311,1493683200"; d="scan'208";a="47345750" From: Paul Durrant To: Paul Durrant , Andrew Cooper , 'Juergen Gross' , Jan Beulich Thread-Topic: [Xen-devel] debian stretch dom0 + xen 4.9 fails to boot Thread-Index: AdLe0KoM3kANRDRYSf+PCIgyxC4kg///62kA///UqkD//530gIAAq+WA//7hiaAASaM11////+MQgAAfuwCAAAbUMIAABKHA Date: Wed, 7 Jun 2017 11:06:34 +0000 Message-ID: References: <5936E230020000780015FEDC@prv-mh.provo.novell.com> <3a0eb227-8302-50db-84a6-b07893ab0e91@oracle.com> <5937D4FF02000078001602F6@suse.com> <0e704f5e-5845-dc56-6058-d0451d43d842@citrix.com> <2baad09e48864a06873037240b8e39dd@AMSPEX02CL03.citrite.net> In-Reply-To: <2baad09e48864a06873037240b8e39dd@AMSPEX02CL03.citrite.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted MIME-Version: 1.0 Cc: "xen-devel \(xen-devel@lists.xenproject.org\)" , "Julien Grall \(julien.grall@arm.com\)" , 'Boris Ostrovsky' Subject: Re: [Xen-devel] debian stretch dom0 + xen 4.9 fails to boot X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP > -----Original Message----- > From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of > Paul Durrant > Sent: 07 June 2017 11:37 > To: Andrew Cooper ; 'Juergen Gross' > ; Jan Beulich > Cc: xen-devel (xen-devel@lists.xenproject.org) devel@lists.xenproject.org>; Julien Grall (julien.grall@arm.com) > ; 'Boris Ostrovsky' > Subject: Re: [Xen-devel] debian stretch dom0 + xen 4.9 fails to boot > > > -----Original Message----- > [snip] > > >> > > >> TBH: I really can't see what is wrong with that patch. The only change > > >> which should be able to break something seems to be the reduction of > > the > > >> wakeup stack size to 3kB, but this shouldn't affect booting the system > > >> at all... > > >> > > > Yeah, my next test is going to be increasing the size of the wakeup stack > > again, but there is really nothing obviously wrong with the patch. > > > > My gut feeling is that there is some path through boot (tickled by these > > two machines) which is clobbering the wrong piece of memory, which was > > previously safe and is now not, because of the rearrangements here. > > > > Debugging these machines is very tricky, because they have no serial or > > IMPI whatsoever. > > > > It does appear to be a layout issue. If I modify the code to just set > wakeup_stack to wakeup_stack_start + PAGE_SIZE, so it has the full 4k then I > still get the problem. However if I then move that code block that includes > wakeup.S and move it to the end of trampoline.S so that wakup code and > stack are once again located at the end then the problem goes away. > It appears that it is just the code that needs to go at the end. The following patch is sufficient to avoid the problem. This may be preferable to a full reversion... Paul > Paul > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > https://lists.xen.org/xen-devel diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 4d640f3fcd..7709a782f9 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -156,7 +156,7 @@ start64: movabs $__high_start,%rax jmpq *%rax -#include "wakeup.S" +ENTRY(wakeup_stack_start) /* The first page of trampoline is permanent, the rest boot-time only. */ /* Reuse the boot trampoline on the 1st trampoline page as stack for wakeup. */ @@ -280,3 +280,4 @@ rm_idt: .word 256*4-1, 0, 0 #include "mem.S" #include "edd.S" #include "video.S" +#include "wakeup.S" diff --git a/xen/arch/x86/boot/wakeup.S b/xen/arch/x86/boot/wakeup.S index f9632eef95..d4824b55d5 100644 --- a/xen/arch/x86/boot/wakeup.S +++ b/xen/arch/x86/boot/wakeup.S @@ -173,5 +173,3 @@ bogus_saved_magic: movw $0x0e00 + 'S', 0xb8014 jmp bogus_saved_magic -/* Stack for wakeup: rest of first trampoline page. */ -ENTRY(wakeup_stack_start)