From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Subject: Re: [PATCH v11 07/13] x86: add multiboot2 protocol support for EFI platforms Date: Thu, 12 Jan 2017 18:35:32 -0600 Message-ID: <1652e36e-40e6-34e7-61a0-466358b146bd@cardoe.com> 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="===============0589556576124975341==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRpqI-0007Ru-0y for xen-devel@lists.xenproject.org; Fri, 13 Jan 2017 00:35:42 +0000 Received: by mail-io0-f193.google.com with SMTP id 101so4135037iom.0 for ; Thu, 12 Jan 2017 16:35:39 -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) --===============0589556576124975341== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HJBkQ1CgbRdGJgTGoFh8c6J3GUWlb7s1c" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HJBkQ1CgbRdGJgTGoFh8c6J3GUWlb7s1c Content-Type: multipart/mixed; boundary="hmEvcDBdHQ3qK8pUbJR1gcRJnnXmudKqa"; 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: <1652e36e-40e6-34e7-61a0-466358b146bd@cardoe.com> 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> --hmEvcDBdHQ3qK8pUbJR1gcRJnnXmudKqa 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. >=20 >>>>>> some memory reserved down there and it was getting trampled. The r= eal >>>>> >>>>> I still do not know why remnants of iPXE should run at this Xen boo= t stage. >>>>> It looks like an iPXE bug and IMO it should be fixed first. >>>> >>>> Like I said above, its because on this machine I am unable to call X= en's >>>> EBS. >>> >>> I do not understand how ExitBootServices() call is related to iPXE ti= mer remnants >>> or so. Though if it is related somehow then I think that you should b= lame machine >>> and/or iPXE designer/developer not Xen developer. >> >> iPXE registers a callback for when EBS is called to clean up a timer. >=20 > Could not you unregister this callback just before jump to the Xen imag= e? > I do not think it is needed for Xen boot. Yep. Already done and merged. But my point is we should prefer to use AllocatePages() and only fall back to trampling any conventional memory region if the call didn't work. --=20 Doug Goldstein --hmEvcDBdHQ3qK8pUbJR1gcRJnnXmudKqa-- --HJBkQ1CgbRdGJgTGoFh8c6J3GUWlb7s1c 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 iQJ8BAEBCgBmBQJYeCDYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvU49EP/jmkw077FbOJfxxXROGVKsSb H6K15K64EJyGAoD+ejJjxFnIRB153eHZ0v9EHJHfGg58qgpceXvnsTfjGGMiLGNz yLTlA2GOFEBrLIxCSFa/JrKtCqhsgewIjU9S3yurlnzgVeVgDBC/2An1eya2jHIq uSR/8AB7NDq8k53Ev1OtHvwn2Z99hkp3ncgvSG3cAbaKKdbQFO2Gjp5IwzzKX6mm iC2oVWhXusrrAPQxXPnNXMuAr/eoPGk2pa0ODHh5MdOnl8c/6NsPtcJMRVH1VXL8 iVdVmcY+HXjAe3lzOl8hjo74L/mJfnHlZs584bVB/+3Tiar7IXOkbUhMdt2k5m0l 2jRW2/+RpnMFDkIoKQIsEy869DFmk4F2m26zZ1Z0uqPstblRxu4lfn79OtDf0y6T v1VDB7Mufm+D3UsGzoOpB7EQ252B3uBi/kLRpXwuNAQ9ilLOMEHygXw+8wQdHF21 2Db2fA1r8iqRcRwWbWDBRljovgkCvsdsK7OwMZlHXiRxas2JnxElFyWEVi4Vm79t 9DvbBuL7z+lROLegc6fO9LEWiugcsMkDPE4jfgQCNTHAFkq0NCS8sbX2JEL/lK7X CLOntzbZRFtxc46lQQqeEJv5Wajf6uYUy2NWoDYgbkq/u5BDtpPpNYMCJxyp8BlR IObpt31FHJgnni0bC/JN =w+Zh -----END PGP SIGNATURE----- --HJBkQ1CgbRdGJgTGoFh8c6J3GUWlb7s1c-- --===============0589556576124975341== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============0589556576124975341==--