[edk2-devel] [PATCH V2 28/28] OvmfPkg: Add LocalApicTimerDxe

Yao, Jiewen jiewen.yao at intel.com
Fri Oct 15 01:21:19 UTC 2021


Good suggestion, Gerd.

I agree with both suggestion. We should rename XenTimerDxe to LocalApicTimerDxe.


> -----Original Message-----
> From: Xu, Min M <min.m.xu at intel.com>
> Sent: Thursday, October 14, 2021 1:20 PM
> To: devel at edk2.groups.io; kraxel at redhat.com
> Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>; Justen, Jordan L
> <jordan.l.justen at intel.com>; Brijesh Singh <brijesh.singh at amd.com>; Erdem
> Aktas <erdemaktas at google.com>; James Bottomley <jejb at linux.ibm.com>;
> Yao, Jiewen <jiewen.yao at intel.com>; Tom Lendacky
> <thomas.lendacky at amd.com>
> Subject: RE: [edk2-devel] [PATCH V2 28/28] OvmfPkg: Add LocalApicTimerDxe
> 
> On October 12, 2021 9:02 PM, Gerd Hoffmann wrote:
> > On Tue, Oct 05, 2021 at 11:39:39AM +0800, Min Xu wrote:
> > > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429
> > >
> > > TDX guest supports LocalApicTimer. But in current OvmfPkg the
> > > supported timer is 8254TimerDxe. So
> > > gUefiOvmfPkgTokenSpaceGuid.PcdTimerSelector
> > > is introduced to select the running Timer. The Timer driver will check
> > > the TimerSelector in its entry point. The default Timer is 8254.
> >
> > Hmm.
> >
> > We already have a local apic timer implementation (XenTimerDxe).  Works fine
> > with kvm, microvm already uses that.  See commit 76602f45dcd9
> > ("OvmfPkg/Microvm: use XenTimerDxe (lapic timer)").
> >
> > So, first I'd suggest to just use that (maybe rename the thing to avoid
> confusion
> > as it isn't really Xen specific).
> Thanks for reminder. Let me first do some more investigation about the
> XenTimerDxe. It will be better to use an existing lapic timer than introducing a
> new one.
> >
> > Next question is whenever there is a need for a runtime switch.  I doubt it is
> > possible to create a virtual machine without lapic, so switching ovmf from
> 8254
> > (aka pit) to lapic unconditionally should work fine.
> > Quick smoke test (patch below) shows no obvious problems.
> Let me do some more investigation.
> >
> 
> Thanks.
> Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82071): https://edk2.groups.io/g/devel/message/82071
Mute This Topic: https://groups.io/mt/86085771/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list