From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 30 Jul 2019 05:30:44 -0700 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 55E16308FBA6; Tue, 30 Jul 2019 12:30:44 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (unknown [10.36.118.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCC5D10013A7; Tue, 30 Jul 2019 12:30:42 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v4 30/35] OvmfPkg/OvmfXen: Introduce XenTimerDxe To: devel@edk2.groups.io, anthony.perard@citrix.com Cc: Julien Grall , xen-devel@lists.xenproject.org, Jordan Justen , Ard Biesheuvel References: <20190729153944.24239-1-anthony.perard@citrix.com> <20190729153944.24239-31-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: Date: Tue, 30 Jul 2019 14:30:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190729153944.24239-31-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 30 Jul 2019 12:30:44 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/29/19 17:39, Anthony PERARD wrote: > "OvmfPkg/8254TimerDxe" is replaced with a Xen-specific > EFI_TIMER_ARCH_PROTOCOL implementation. Also remove > 8259InterruptControllerDxe as it is not used anymore. > > This Timer uses the local APIC timer as time source as it can work on > both a Xen PVH guest and an HVM one. > > Based on the "OvmfPkg/8254TimerDxe" implementation. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 > Signed-off-by: Anthony PERARD > Acked-by: Laszlo Ersek > --- > > Notes: > v4: > - fix the commit message to reflect the fact that the original code as > moved. > - Update Maintainers.txt > > v3: > - rebased, SPDX, copyright > > v2: > - Use InitializeApicTimer instead of WriteLocalApicReg > - rework comments (remove many that don't apply) > - remove unused includes, and libs > - have a macro to the timervector. > - cleanup, copyright > - rework calculation of TimerCount, value to be use by the APIC timer > - check for overflow of TimerPeriod, with the apic timer, the period can > be up to about 42s on Xen (or even higher by changing the DivideValue). > > OvmfPkg/OvmfXen.dsc | 3 +- > OvmfPkg/OvmfXen.fdf | 3 +- > OvmfPkg/XenTimerDxe/XenTimerDxe.inf | 42 ++++ > OvmfPkg/XenTimerDxe/XenTimerDxe.h | 177 ++++++++++++++ > OvmfPkg/XenTimerDxe/XenTimerDxe.c | 355 ++++++++++++++++++++++++++++ > Maintainers.txt | 1 + > 6 files changed, 577 insertions(+), 4 deletions(-) > create mode 100644 OvmfPkg/XenTimerDxe/XenTimerDxe.inf > create mode 100644 OvmfPkg/XenTimerDxe/XenTimerDxe.h > create mode 100644 OvmfPkg/XenTimerDxe/XenTimerDxe.c [...] > diff --git a/Maintainers.txt b/Maintainers.txt > index f51731a6b6..78e9f889ab 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -385,6 +385,7 @@ F: OvmfPkg/XenIoPciDxe/ > F: OvmfPkg/XenPlatformPei/ > F: OvmfPkg/XenPvBlkDxe/ > F: OvmfPkg/XenResetVector/ > +F: OvmfPkg/XenTimerDxe/ > R: Anthony Perard > R: Julien Grall > > Acked-by: Laszlo Ersek