Adding Jordan.
On 10/21/15 03:14, Kinney, Michael D wrote:
> Bruce,
>
> No. Different ASSERT().
>
> That looks like a new bug, and it is in the new code I added to force BSP to
> wait for all APs to enter sleeping state before StartupAllAPs() is called.
>
> How did you reproduce this?
Actually, I'm seeing a related / similar assertion failure, from here:
//
// Wait for all APs to enter idle loop.
//
Timeout = 0;
do {
if (CheckAllAPsSleeping ()) {
break;
}
gBS->Stall (gPollInterval);
Timeout += gPollInterval;
} while (Timeout <= PcdGet32 (PcdCpuApInitTimeOutInMicroSeconds));
ASSERT (Timeout <= PcdGet32 (PcdCpuApInitTimeOutInMicroSeconds));
I'm not doing anything special, just booting a preexistent guest on KVM.
The default timeout from UefiCpuPkg is 50msec, which is apparently too
short here. I have not discovered this in practice earlier because:
- I've been focusing on TCG
- my patch
[PATCH] OvmfPkg: increase MP services startup timeou
http://thread.gmane.org/gmane.comp.bios.edk2.devel/3260
has been part of my builds recently.
So, I think we might have to apply said patch to OvmfPkg quickly, but
not strictly in response to the bug report / analysis from Janusz Mocek
& Xiao Guangrong: instead, to fix up this regression.
(See also
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/3198/focus=3223>,
where I pointed out that the UefiCpuPkg change actually halves the
preexistent timeout.)
Then, any smarts discussed under
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/3260/focus=3264>
should be implemented on top.
Jordan, do you agree we can / should preliminarily apply my patch?
As-is, OVMF might not boot on KVM at all at the moment, due to these
timeouts.
Thanks
Laszlo
>
> Thanks,
>
> Mike
>
>> -----Original Message-----
>> From: edk2-devel [mailto:[email protected]] On Behalf Of
>> Bruce Cran
>> Sent: Tuesday, October 20, 2015 5:21 PM
>> To: Laszlo Ersek; [email protected]
>> Subject: Re: [edk2] [PATCH v3 01/52] UefiCpuPkg: CpuDxe: Fix ASSERT() when
>> only 1 CPU detected
>>
>> On 10/14/15 4:25 PM, Laszlo Ersek wrote:
>>> From: Michael Kinney <[email protected]>
>>>
>>> When only 1 CPU is detected and the max CPUs is greater than 1,
>>> an ASSERT() is generated because the pages associated with the
>>> AP stack have already been freed. Only do this FreePages() call
>>> if there is more than 1 CPU detected.
>>
>> Is the ASSERT() that was being triggered "LockValue == ((UINTN) 2) ||
>> LockValue == ((UINTN) 1)" in:
>>
>> AcquireSpinLockOrFail
>> GetMpSpinLock
>> TestCpuStatusFlag
>> CheckAllAPsSleeping
>> InitializeMpSupport
>> InitializeCpu
>> ...
>>
>> Or is this a separate bug?
>>
>> --
>> Bruce
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel