Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-26 Thread m...@console-pimps.org
On Thu, 20 Jun, at 06:04:50PM, Zachary Bobroff wrote: > All, > > I am attaching a further updated version of eboot.c . We removed the > low_alloc routine from the exit_boot function only. We also removed > the goto statements(sorry we just aren’t huge fans of goto's in c, you > can change it bac

RE: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-20 Thread Zachary Bobroff
- From: H. Peter Anvin [mailto:h...@zytor.com] Sent: Wednesday, June 19, 2013 4:53 AM To: m...@console-pimps.org; Zachary Bobroff Cc: 'Jan Beulich'; matt.flem...@intel.com; mj...@srcf.ucam.org; Joey Lee; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; sta...@vger.kernel.org

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-19 Thread H. Peter Anvin
The 0xa restriction applies to BIOS really... "m...@console-pimps.org" wrote: >On Tue, 18 Jun, at 10:12:22PM, Zachary Bobroff wrote: >> > Okay, I'm fine with that aspect then. Let's hope everyone plays by >> > that rule. >> This is all according to specification, so if they are not following

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-19 Thread m...@console-pimps.org
On Tue, 18 Jun, at 10:12:22PM, Zachary Bobroff wrote: > > Okay, I'm fine with that aspect then. Let's hope everyone plays by > > that rule. > This is all according to specification, so if they are not following > these rules they should be corrected. The link to where the current > public version

RE: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-18 Thread Zachary Bobroff
uesday, June 18, 2013 9:04 AM To: Zachary Bobroff; m...@console-pimps.org Cc: matt.flem...@intel.com; mj...@srcf.ucam.org; Joey Lee; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; sta...@vger.kernel.org Subject: RE: [PATCH] x86, efi: retry ExitBootServices() on failure >>> Zachary Bo

RE: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-18 Thread Jan Beulich
>>> Zachary Bobroff 06/18/13 2:25 AM >>> > We only need to retry once because of what is in the UEFI specification 2.3.1 > Errata > C. The exact verbiage is as follows: > > The ExitBootServices() function is called by the currently executing EFI OS > loader > image to terminate all boot service

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-18 Thread joeyli
Thanks for Zach's clarify, then I think that makes sense BIOS has problem if kernel need call ExitBootServices() more then 2 times. Thanks Joey Lee 於 二,2013-06-18 於 04:20 +,Zachary Bobroff 提到: > The timer is shutdown before callbacks on exitbootservices are called. The > bios should be ent

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Zachary Bobroff
The timer is shutdown before callbacks on exitbootservices are called. The bios should be entirely single threaded at this point unless Linux has started some other CPUs. So exitbootservices will not return until each until each callback is complete. In short, then it would return the status

RE: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread joeyli
Hi Zach, 於 二,2013-06-18 於 00:18 +,Zachary Bobroff 提到: > All, > > >> Why a single retry is having reasonable guarantees to work when the > original one failed (nothing prevents an event handler to do another > allocation the next time through). > > This patch is being submitted because of th

RE: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Zachary Bobroff
tthew Garrett; Joey Lee; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; sta...@vger.kernel.org Subject: Re: [PATCH] x86, efi: retry ExitBootServices() on failure On Mon, 17 Jun, at 12:02:05PM, Jan Beulich wrote: > >>> On 17.06.13 at 12:17, Matt Fleming wrote: > > > &

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Matt Fleming
On Mon, 17 Jun, at 12:02:05PM, Jan Beulich wrote: > >>> On 17.06.13 at 12:17, Matt Fleming wrote: > > > > What value would you suggest for the retry? > > I'd be considering something like 5...10, but this to some degree > depends on what odd kinds of behavior this in fact needs to > cover. I ge

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Jan Beulich
>>> On 17.06.13 at 12:17, Matt Fleming wrote: > On Mon, 17 Jun, at 10:46:28AM, Jan Beulich wrote: >> I agree that there ought to be an upper limit. But a single retry here >> again looks like a tailored solution to a particular observed (mis-) >> behavior, rather than something resulting from gene

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread joeyli
於 一,2013-06-17 於 11:17 +0100,Matt Fleming 提到: > On Mon, 17 Jun, at 10:46:28AM, Jan Beulich wrote: > > To me, all this looks like it is being done on phenomenological basis, > > taking a particular build of a particular firmware implementation as > > the reference. Imo we shouldn't change the code i

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Matt Fleming
On Mon, 17 Jun, at 10:46:28AM, Jan Beulich wrote: > To me, all this looks like it is being done on phenomenological basis, > taking a particular build of a particular firmware implementation as > the reference. Imo we shouldn't change the code in this way. This > also applies to the fact that the s

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Jan Beulich
>>> On 17.06.13 at 11:21, Matt Fleming wrote: > On Fri, 14 Jun, at 12:00:33AM, joeyli wrote: >> > From: Zach Bobroff >> > --- a/arch/x86/boot/compressed/eboot.c >> > +++ b/arch/x86/boot/compressed/eboot.c >> > @@ -1037,18 +1037,20 @@ static efi_status_t exit_boot(struct boot_params >> > *boot_pa

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-17 Thread Matt Fleming
On Fri, 14 Jun, at 12:00:33AM, joeyli wrote: > Hi Zach, > > 於 二,2013-06-11 於 07:52 +0100,Matt Fleming 提到: > > From: Zach Bobroff > > > > ExitBootServices is absolutely supposed to return a failure if any > > ExitBootServices event handler changes the memory map. Basically the > > get_map loop

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-13 Thread joeyli
Hi Zach, 於 二,2013-06-11 於 07:52 +0100,Matt Fleming 提到: > From: Zach Bobroff > > ExitBootServices is absolutely supposed to return a failure if any > ExitBootServices event handler changes the memory map. Basically the > get_map loop should run again if ExitBootServices returns an error the > f

Re: [PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-11 Thread Matt Fleming
On Tue, 11 Jun, at 07:52:38AM, Matt Fleming wrote: > From: Zach Bobroff > > ExitBootServices is absolutely supposed to return a failure if any > ExitBootServices event handler changes the memory map. Basically the > get_map loop should run again if ExitBootServices returns an error the > first t

[PATCH] x86, efi: retry ExitBootServices() on failure

2013-06-10 Thread Matt Fleming
From: Zach Bobroff ExitBootServices is absolutely supposed to return a failure if any ExitBootServices event handler changes the memory map. Basically the get_map loop should run again if ExitBootServices returns an error the first time. I would say it would be fair that if ExitBootServices giv

[PATCH] x86, efi: retry ExitBootServices() on failure

2013-05-22 Thread Matt Fleming
From: Matt Fleming ExitBootServices() can legitimately fail if any of the event handlers that are signaled by its invocation change the memory map. In that case, we need to get the memory map and exit boot services again. Only retry once so that we don't get stuck if ExitBootServices() is returni