From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B0C9D20954B88 for ; Fri, 16 Mar 2018 07:00:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 541FBEB6F6; Fri, 16 Mar 2018 14:06:33 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-123-79.rdu2.redhat.com [10.10.123.79]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4656A215CDAF; Fri, 16 Mar 2018 14:06:32 +0000 (UTC) To: Ard Biesheuvel Cc: edk2-devel-01 , Xiang Zheng References: <20180315190258.6580-1-lersek@redhat.com> <20180315190258.6580-2-lersek@redhat.com> <4ebe3836-3e6c-2801-89aa-2a2b15d57541@redhat.com> From: Laszlo Ersek Message-ID: Date: Fri, 16 Mar 2018 15:06:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 16 Mar 2018 14:06:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 16 Mar 2018 14:06:33 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH 1/5] ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 14:00:09 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 03/16/18 14:45, Ard Biesheuvel wrote: > On 16 March 2018 at 13:40, Laszlo Ersek wrote: >> On 03/16/18 10:58, Ard Biesheuvel wrote: >>> On 15 March 2018 at 19:02, Laszlo Ersek wrote: >>>> Move the TryRunningQemuKernel() call back to its original place. >>> >>> When was it moved and why? >> >> See, I'm at a loss about the detail you expect in commit messages. :) > > I see. But in this case, I think it is rather obvious that when you > move something back to where it was moved away from earlier, you have > to justify why the original reason for moving it no longer applies, or > is overruled by something more important. > >> I >> had spent 10 minutes on wording this commit message. Near the end of my >> struggle, I had exactly one sentence on each of those three commits that >> I listed at the bottom (23d04b58e27b, a78c4836ea0b, 158990b941e4). Those >> three sentences were going to give the answer to your question. I still >> worried you might file them under "personal journey" or "stream of >> consciousness", and I cut them; I only left the three commit hashes at >> the end as pointers. >> > > I looked at those commit logs but it wasn't obvious to me. > >> So, the executive summary is: "TryRunningQemuKernel() was moved in >> a78c4836ea0b, because the guest kernel depended on ACPI tables, which >> depended on our ACPI platform driver, which at the time depended on >> PciBusDxe itself reporting 'enumeration complete', which at the time >> depended on our BdsLibConnectAll() call". >> >> The somewhat expanded answer is, from scratch: >> >> (1) in commit 23d04b58e27b, we introduced TryRunningQemuKernel() in the >> right spot (for boot performance), between >> PlatformBdsConnectConsole() and BdsLibConnectAll(); >> >> (2) in commit a78c4836ea0b, we moved TryRunningQemuKernel() after >> BdsLibConnectAll(): the direct-booted kernel needed ACPI tables >> (reflecting PCI resources correctly), and at that time, we only >> connected the root bridges to PciBusDxe as part of >> BdsLibConnectAll() (which signaled the ACPI platform driver via >> "gEfiPciEnumerationCompleteProtocolGuid"); >> >> (3) in commit 60dc18a17c516 and (more importantly) 158990b941e4, >> connecting the root bridges and cueing the ACPI platform driver were >> finally separated from BdsLibConnectAll(), but we didn't realize we >> could move TryRunningQemuKernel() back above BdsLibConnectAll(). >> >> So, after 158990b941e4, we can do it now. >> > > Thanks for clearing that up. Are you OK with the patch with this information available? Should I include some (or all) of the above in the commit message? Thanks! Laszlo