On 02/03/21 05:28, Ankur Arora wrote:
> On 2021-01-31 7:13 p.m., Laszlo Ersek wrote:
>> On 01/29/21 01:59, Ankur Arora wrote:

>>> +**/
>>> +STATIC
>>> +EFI_STATUS
>>> +UnplugCpus (
>>> +  IN APIC_ID                      *ToUnplugApicIds,
>>> +  IN UINT32                       ToUnplugCount
>>> +  )
>>> +{
>>> +  EFI_STATUS Status;
>>> +  UINT32     ToUnplugIdx;
>>> +  UINTN      ProcessorNum;
>>> +
>>> +  ToUnplugIdx = 0;
>>> +  while (ToUnplugIdx < ToUnplugCount) {
>>> +    APIC_ID    RemoveApicId;
>>> +
>>> +    RemoveApicId = ToUnplugApicIds[ToUnplugIdx];
>>> +
>>> +    //
>>> +    // mCpuHotPlugData->ApicId maps ProcessorNum -> ApicId. Use it
>>> to find
>>> +    // the ProcessorNum for the APIC ID to be removed.
>>> +    //
>>> +    for (ProcessorNum = 0;
>>> +         ProcessorNum < mCpuHotPlugData->ArrayLength;
>>> +         ProcessorNum++) {
>>> +      if (mCpuHotPlugData->ApicId[ProcessorNum] == RemoveApicId) {
>>> +        break;
>>> +      }
>>> +    }
>>> +
>>> +    //
>>> +    // Ignore the unplug if APIC ID not found
>>> +    //
>>> +    if (ProcessorNum == mCpuHotPlugData->ArrayLength) {
>>> +      DEBUG ((DEBUG_INFO, "%a: did not find APIC ID " FMT_APIC_ID
>>> +          " to unplug\n", __FUNCTION__, RemoveApicId));
>>
>> (2) Please use DEBUG_VERBOSE here.
>>
>> (I agree that we should have *one* DEBUG_INFO message that relates to
>> the removal of an individual processor; however, I think we should emit
>> that message when we finally signal QEMU to eject the processor.)
> 
> Based on our discussion around establishing the correspondence between
> The ProcessorNum, APIC-ID and CPU selector, I'll change this to
> DEBUG_VERBOSE and add a new DEBUG_INFO print after successfully
> putting it in the APICIdMap.

Thanks!

[...]

Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71112): https://edk2.groups.io/g/devel/message/71112
Mute This Topic: https://groups.io/mt/80199964/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to