On November 22, 2021 11:05 AM, Ni Ray wrote:
> Min,
> What's the reason of moving this driver to UefiCpuPkg?
Please refer to the discussion in 
https://edk2.groups.io/g/devel/topic/86735078#83126
Because localApicTimerDxe is hardware feature. There is no specific OVMF or 
QEMU related thing there. It does not make sense to keep it to OvmfPkg.
> 
> When the LocalApicTimerDxe is in OvmfPkg, it's clear that this driver is only
> used by OVMF/QEMU platform.
> Now since the patch moves the driver to UefiCpuPkg, it's possible that other
> platforms may choose this driver as the timer driver in DXE phase.
> 
> So, we need to make sure the quality of this driver is good enough for a
> broad scope of platforms.
> 
> 1. What's the issue when this driver still stays in OvmfPkg? If it's a must 
> that
> this driver stays in UefiCpuPkg, please help to address following questions:
> 
> 2. Can SourceLevelDebug (rely on Local APIC timer) work if this driver is
> chosen as DXE timer driver?
After checking the code and running the PoC (enable SourceLevelDebug and 
LocalApicTimerDxe),  I find this driver doesn't work anymore. 
Actually it asserts in 
https://github.com/mxu9/edk2/blob/ovmf_lapic_timer.v3/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c#L334

For TDVF we assume SourceLevelDebug is not supported. So LocalApicTimerDxe is 
still working for TDVF.

For other VM guests in OvmfPkg, can we assume SourceLevelDebug is NOT supported 
after LocalApicTimer is used (the older timer is 8254)?
@Gerd Hoffmann (OvmfPkg)
@ Rebecca Cran, @ Peter Grehan  (Bhyve)
@ Tom Lendacky, @Brijesh Singh (Sev)
@ Anthony Perard , Julien Grall (Xen) 

This limitation will be documented in LocalApicTimerDxe.inf so that the user of 
this timer driver is aware of it.

> 3. Can detailed comments be added for " @bug : This does not handle
> missed timer interrupts" in TimerInterruptHandler()?
Sure. More comments will be added.
> 4. Can detailed comments be added for " DisableInterrupts ();" in
> TimerInterruptHandler()?
Sure. More comments will be added.
> 5. In general what kinds of platforms are capable of using this driver as 
> Timer
> driver?
Platforms that support local Apic are capable of using this driver.
> 

Thanks
Min


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


Reply via email to