Laszlo,

BaseXApicX2ApicLib is intended to be used by platforms that support more >=256 
CPUs.

If the current system configuration is < 256 CPUs, then the platform will 
typically stay in APIC mode.  If >= 256 CPUs are detected, then X2 APIC mode 
can be enabled using the following API.

VOID
EFIAPI
SetApicMode (
  IN UINTN  ApicMode
  )

So just adding BaseXApicX2ApicLib to the DSC does not enable X2 APIC mode.  You 
have to add logic to enable X2 APIC mode.

I see that QEMU is limited to 255 VCPUs, so the use of BaseXApicLib makes 
sense.  Are OVMF configurations supported with >= 256 VCPUs?

Thanks,

Mike

>-----Original Message-----
>From: Laszlo Ersek [mailto:ler...@redhat.com]
>Sent: Wednesday, November 04, 2015 2:41 AM
>To: Paolo Bonzini; edk2-de...@ml01.01.org; Kinney, Michael D; Fan, Jeff;
>Justen, Jordan L
>Subject: Re: [edk2] [PATCH v4 18/41] OvmfPkg: select LocalApicLib instance
>with x2apic support if SMM_REQUIRE
>
>On 11/04/15 09:48, Paolo Bonzini wrote:
>>
>>
>> On 03/11/2015 22:00, Laszlo Ersek wrote:
>>> +
>>> +!if $(SMM_REQUIRE) == TRUE
>>> +
>LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
>>> +!else
>>>    LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
>>> +!endif
>>> +
>>
>> Can we enable BaseXApicX2ApicLib unconditionally?
>
>I think I am technically capable of that :), but should we? We haven't
>used BaseXApicX2ApicLib thus far in OVMF, so I can't predict at all if
>it could regress stuff or not. If it causes problems with the
>SMM_REQUIRE build, so be it, that's new stuff, but I wanted to avoid
>such a global change for the traditional build.
>
>I'm not against it, I just don't have experience with BaseXApicX2ApicLib.
>
>Mike, Jeff, Jordan -- what do you think? Why do separate BaseXApicLib
>and BaseXApicX2ApicLib instances exist? And why has OvmfPkg always used
>the former? If it has only been for simplicity's sake, and
>BaseXApicX2ApicLib is otherwise widely used internally at Intel, then I
>think Paolo is right, and we should just keep the OVMF DSCs simple.
>
>Thanks
>Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to