From: Doug Goldstein Subject: Re: [PATCH v11 07/13] x86: add multiboot2 protocol support for EFI platforms Date: Thu, 12 Jan 2017 18:37:47 -0600 Message-ID: References: <1480976718-12198-1-git-send-email-daniel.kiper@oracle.com> <1480976718-12198-8-git-send-email-daniel.kiper@oracle.com> <96e86b22-8940-dce2-d1b9-92d1c132ad0e@cardoe.com> <20170111194714.GZ32675@olila.local.net-space.pl> <66b5b99e-14fc-5125-492e-83a692f816a9@cardoe.com> <20170112125036.GG32675@olila.local.net-space.pl> <819f2a11-5750-a0c3-055b-8b7879b21179@cardoe.com> <20170112202827.GK32675@olila.local.net-space.pl> <20170113000445.GB23864@olila.local.net-space.pl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7577945288088032184==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRpsN-0007b6-Up for xen-devel@lists.xenproject.org; Fri, 13 Jan 2017 00:37:52 +0000 Received: by mail-io0-f195.google.com with SMTP id q20so4113735ioi.3 for ; Thu, 12 Jan 2017 16:37:50 -0800 (PST) In-Reply-To: <20170113000445.GB23864@olila.local.net-space.pl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Daniel Kiper Cc: jgross@suse.com, sstabellini@kernel.org, andrew.cooper3@citrix.com, pgnet.dev@gmail.com, ning.sun@intel.com, julien.grall@arm.com, jbeulich@suse.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, gang.wei@intel.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============7577945288088032184== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3DxamfTOrDpsG9Vv1C9nEVgv2a5WFWXhp" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3DxamfTOrDpsG9Vv1C9nEVgv2a5WFWXhp Content-Type: multipart/mixed; boundary="GiR7eDO8G5iLKKTmMomBv3xdEUt75aaFE"; protected-headers="v1" From: Doug Goldstein To: Daniel Kiper Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com, fu.wei@linaro.org, gang.wei@intel.com, jbeulich@suse.com, jgross@suse.com, julien.grall@arm.com, konrad.wilk@oracle.com, ning.sun@intel.com, pgnet.dev@gmail.com, qiaowei.ren@intel.com, sstabellini@kernel.org Message-ID: Subject: Re: [PATCH v11 07/13] x86: add multiboot2 protocol support for EFI platforms References: <1480976718-12198-1-git-send-email-daniel.kiper@oracle.com> <1480976718-12198-8-git-send-email-daniel.kiper@oracle.com> <96e86b22-8940-dce2-d1b9-92d1c132ad0e@cardoe.com> <20170111194714.GZ32675@olila.local.net-space.pl> <66b5b99e-14fc-5125-492e-83a692f816a9@cardoe.com> <20170112125036.GG32675@olila.local.net-space.pl> <819f2a11-5750-a0c3-055b-8b7879b21179@cardoe.com> <20170112202827.GK32675@olila.local.net-space.pl> <20170113000445.GB23864@olila.local.net-space.pl> In-Reply-To: <20170113000445.GB23864@olila.local.net-space.pl> --GiR7eDO8G5iLKKTmMomBv3xdEUt75aaFE Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 1/12/17 6:04 PM, Daniel Kiper wrote: > On Thu, Jan 12, 2017 at 04:23:59PM -0600, Doug Goldstein wrote: >> On 1/12/17 2:28 PM, Daniel Kiper wrote: >>> On Thu, Jan 12, 2017 at 09:52:15AM -0600, Doug Goldstein wrote: >>>> On 1/12/17 6:50 AM, Daniel Kiper wrote: >>>>> On Wed, Jan 11, 2017 at 02:20:15PM -0600, Doug Goldstein wrote: >>>>>> On 1/11/17 1:47 PM, Daniel Kiper wrote: >>>>>>> On Tue, Jan 10, 2017 at 02:51:27PM -0600, Doug Goldstein wrote: >>>>>>>> On 1/9/17 7:37 PM, Doug Goldstein wrote: >=20 > [...] >=20 >>>>>>>> memory region). You need to use AllocatePages() otherwise you ar= e >>>>>>>> trampling memory that might have been allocated by the bootloade= r or any >>>>>>> >>>>>>> Bootloader code/data should be dead here. >>>>>> >>>>>> Correct. Unfortunately on my Lenovo laptop and my Intel NUCs I can= 't >>>>>> currently call ExitBootServices and a timer that iPXE has wired up= has >>>>> >>>>> If you disable an important wheel in a machine you should not expec= t >>>>> that the machine will work. Sorry! No way! >>>> >>>> Speak to your co-workers Konrad and Boris. We've had long email thre= ads >>>> about how certain hardware does not work with the way Xen calls >>>> ExitBootServices. >>> >>> Could you be more precise what is wrong? Or at least send links to >>> relevant threads. >> >> There have been several on the ML over the past 2 years. A quick Googl= e >> search turns these up. >> >> http://xen.markmail.org/message/f6lx2ab4o2fch35r >> https://lists.xenproject.org/archives/html/xen-devel/2015-01/msg03164.= html >=20 > This is more or less what I expected. However, IIRC, it was not related= > to ExitBootServices() itself. The problem was that some runtime service= s > code lived in boot services code and data regions. So, I suppose that i= f > you map boot services code and data regions with runtime services code > and data everything should work. However, I have just realized that we > need an option to enable this functionality from GRUB2 command line. > Though you can do a test by setting map_bs to 1 at the beginning of > efi_multiboot2(). Do not forget to enable ExitBootServices() call in Xe= n. On Intel NUCs, Super Micro boards and others, you are unable to call ExitBootServices() without having called SetVirtualAddressMap(). If you follow through both threads you'll see there's more than just map_bs. Konrad also proposed adding /noexitbs --=20 Doug Goldstein --GiR7eDO8G5iLKKTmMomBv3xdEUt75aaFE-- --3DxamfTOrDpsG9Vv1C9nEVgv2a5WFWXhp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJYeCFbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUMRcP/2SJtVwNsagkQTTylZaQsYBH PnyY9ulIjCPXfgxQ+6itQ1zwuLtFqH2CsCiS7ERCHSwmak0bUJcZtvpe1rliehYf lOcEfF/CFoVPHDxUUTakW7LpDnriNZhjEQw1f5Rc1bWjLK/AdxvzrvFKFZLs/BMD 9uTdToAz7BUXHcVaNVg/PlEkbW8ZX+l/rVOzQCBvBpQN2icMA0gOjjSw+I8By2he u7/v8YrzHLpyNYCayyt1EAe2iKV7oTXyFm1qf7OmVNeKqemHg6PqgehQuL+8/q+4 6vir/VsEj/wfj30vx6cL3fSIICGmkd1fqY/29wnYjnY74FIBqYFhSFc7BU8Gmaeb mmzsdyO9TpHDdYrcmevPA9MQWC0KTMwoU3csT7cJwJNd3Nz0X3fIK2wygKPYKvtZ +a4C5/v9zAx5PPsIl/75Sab9Y5f76mhT7YAkBbmykWG26FIrIOHGU8xGxJarpP5U 2CZIsqB5Q9bH2jSgybVYyNXCFeqh3nlSse8Yr+P5FVGddT6gcy9eNzsFIfNkx98x uZijahv4gZ4xhkilzmJAJskgSwLQ2cGHNXTY5ixxuqUWMkcl46zzWWo0GekXdMA7 rImhBvzDnRRlC8LxFM2eM44scc9FEMUHm7wcaC8CzCj3PCQXasQLJEaE/HuGvDbY 33byxmPIo8NNDp1u85mQ =5hXq -----END PGP SIGNATURE----- --3DxamfTOrDpsG9Vv1C9nEVgv2a5WFWXhp-- --===============7577945288088032184== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============7577945288088032184==--