public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Ni, Ray" <ray.ni@intel.com>, "Xu, Min M" <min.m.xu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	Julien Grall <julien@xen.org>, "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [PATCH V3 3/3] OvmfPkg: Move LocalApicTimerDxe to UefiCpuPkg
Date: Mon, 22 Nov 2021 03:34:08 +0000	[thread overview]
Message-ID: <MW4PR11MB58729F4322D065BDB2BD54248C9F9@MW4PR11MB5872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BN0PR11MB56965413D29DF06B213AF4B38C9F9@BN0PR11MB5696.namprd11.prod.outlook.com>

Thanks Ray.

I prefer to put the LocalApicTimerDxe to UefiCpuPkg, because it is hardware feature.
There is no specific OVMF or QEMU related thing there. It does not make sense to keep it to OvmfPkg.

Your quality concern is valid. I think the quality expectation for LocalApicTimerDxe should be same, no matter it is in OvmfPkg or UefiCpuPkg.
I don't think the expectation is that the quality can be lower if it is in OvmfPkg and it must be higher if it is in UefiCpuPkg.

All quality issues of LocalApicTimerDxe should be resolved, no matter where it is finally located.

Thank you
Yao Jiewen


> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Monday, November 22, 2021 11:05 AM
> To: Xu, Min M <min.m.xu@intel.com>; devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Gerd Hoffmann
> <kraxel@redhat.com>; Anthony Perard <anthony.perard@citrix.com>; Julien
> Grall <julien@xen.org>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH V3 3/3] OvmfPkg: Move LocalApicTimerDxe to UefiCpuPkg
> 
> Min,
> What's the reason of moving this driver to UefiCpuPkg?
> 
> 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?
> 3. Can detailed comments be added for " @bug : This does not handle missed
> timer interrupts" in TimerInterruptHandler()?
> 4. Can detailed comments be added for " DisableInterrupts ();" in
> TimerInterruptHandler()?
> 5. In general what kinds of platforms are capable of using this driver as Timer
> driver?
> 
> Thanks,
> Ray
> 
> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Monday, November 8, 2021 2:08 PM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Gerd Hoffmann <kraxel@redhat.com>; Anthony Perard
> <anthony.perard@citrix.com>; Julien Grall <julien@xen.org>; Dong, Eric
> <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [PATCH V3 3/3] OvmfPkg: Move LocalApicTimerDxe to UefiCpuPkg
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3711
> 
> OvmfPkg.dec is removed from [Packages] because it doesn't depend
> on OvmfPkg. LocalApicTimerDxe is moved to UefiCpuPkg.
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Julien Grall <julien@xen.org>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> ---
>  OvmfPkg/AmdSev/AmdSevX64.dsc                                | 2 +-
>  OvmfPkg/AmdSev/AmdSevX64.fdf                                | 2 +-
>  OvmfPkg/Microvm/MicrovmX64.dsc                              | 2 +-
>  OvmfPkg/Microvm/MicrovmX64.fdf                              | 2 +-
>  OvmfPkg/OvmfPkgIa32.dsc                                     | 2 +-
>  OvmfPkg/OvmfPkgIa32.fdf                                     | 2 +-
>  OvmfPkg/OvmfPkgIa32X64.dsc                                  | 2 +-
>  OvmfPkg/OvmfPkgIa32X64.fdf                                  | 2 +-
>  OvmfPkg/OvmfPkgX64.dsc                                      | 2 +-
>  OvmfPkg/OvmfPkgX64.fdf                                      | 2 +-
>  OvmfPkg/OvmfXen.dsc                                         | 2 +-
>  OvmfPkg/OvmfXen.fdf                                         | 2 +-
>  .../LocalApicTimerDxe/LocalApicTimerDxe.c                   | 0
>  .../LocalApicTimerDxe/LocalApicTimerDxe.h                   | 0
>  .../LocalApicTimerDxe/LocalApicTimerDxe.inf                 | 6 ++++--
>  15 files changed, 16 insertions(+), 14 deletions(-)
>  rename {OvmfPkg => UefiCpuPkg}/LocalApicTimerDxe/LocalApicTimerDxe.c
> (100%)
>  rename {OvmfPkg => UefiCpuPkg}/LocalApicTimerDxe/LocalApicTimerDxe.h
> (100%)
>  rename {OvmfPkg => UefiCpuPkg}/LocalApicTimerDxe/LocalApicTimerDxe.inf
> (79%)
> 
> diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc
> b/OvmfPkg/AmdSev/AmdSevX64.dsc
> index 88c51dfe8337..888fc24f1b58 100644
> --- a/OvmfPkg/AmdSev/AmdSevX64.dsc
> +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
> @@ -674,7 +674,7 @@
>    MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
>    UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>    UefiCpuPkg/CpuDxe/CpuDxe.inf
> -  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> 
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>    OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
>    MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
> diff --git a/OvmfPkg/AmdSev/AmdSevX64.fdf
> b/OvmfPkg/AmdSev/AmdSevX64.fdf
> index 7489b04198fe..659810f96bec 100644
> --- a/OvmfPkg/AmdSev/AmdSevX64.fdf
> +++ b/OvmfPkg/AmdSev/AmdSevX64.fdf
> @@ -208,7 +208,7 @@ INF
> MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
>  INF  MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
>  INF  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>  INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
> -INF  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +INF  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  INF
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>  INF  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
>  INF  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
> diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc
> b/OvmfPkg/Microvm/MicrovmX64.dsc
> index 1a0e848f8356..fcb8b571a041 100644
> --- a/OvmfPkg/Microvm/MicrovmX64.dsc
> +++ b/OvmfPkg/Microvm/MicrovmX64.dsc
> @@ -656,7 +656,7 @@
> 
>    MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
>    MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> -  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>    UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>    UefiCpuPkg/CpuDxe/CpuDxe.inf
> 
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
> diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf
> b/OvmfPkg/Microvm/MicrovmX64.fdf
> index ac9efba26811..d02e88e2a48e 100644
> --- a/OvmfPkg/Microvm/MicrovmX64.fdf
> +++ b/OvmfPkg/Microvm/MicrovmX64.fdf
> @@ -215,7 +215,7 @@ INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>  INF  MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>  INF  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
>  INF  MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> -INF  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +INF  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  INF  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>  INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
>  INF
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index d0e9f3ca05f6..f8c8ef1e58be 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -763,7 +763,7 @@
>    OvmfPkg/8259InterruptControllerDxe/8259.inf
>    OvmfPkg/8254TimerDxe/8254Timer.inf
>  !else
> -  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  !endif
> 
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>    OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
> index b7b35a3a490a..321d4a871afa 100644
> --- a/OvmfPkg/OvmfPkgIa32.fdf
> +++ b/OvmfPkg/OvmfPkgIa32.fdf
> @@ -218,7 +218,7 @@ INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
>    INF OvmfPkg/8259InterruptControllerDxe/8259.inf
>    INF OvmfPkg/8254TimerDxe/8254Timer.inf
>  !else
> -  INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  !endif
>  INF
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>  INF  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index d3531d388e24..4de4ed21a5ca 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -777,7 +777,7 @@
>    OvmfPkg/8259InterruptControllerDxe/8259.inf
>    OvmfPkg/8254TimerDxe/8254Timer.inf
>  !else
> -  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  !endif
> 
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>    OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
> index 986228a44c78..10e97c35001f 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.fdf
> +++ b/OvmfPkg/OvmfPkgIa32X64.fdf
> @@ -222,7 +222,7 @@ INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
>    INF OvmfPkg/8259InterruptControllerDxe/8259.inf
>    INF OvmfPkg/8254TimerDxe/8254Timer.inf
>  !else
> -  INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  !endif
>  INF
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>  INF  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index c6ee624fc738..57b0c3c10826 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -775,7 +775,7 @@
>    OvmfPkg/8259InterruptControllerDxe/8259.inf
>    OvmfPkg/8254TimerDxe/8254Timer.inf
>  !else
> -  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  !endif
> 
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>    OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index 99339e73bb51..b52c43127845 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -238,7 +238,7 @@ INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
>    INF  OvmfPkg/8259InterruptControllerDxe/8259.inf
>    INF  OvmfPkg/8254TimerDxe/8254Timer.inf
>  !else
> -  INF  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  INF  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  !endif
>  INF
> OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
>  INF  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 7c4c5412d102..d4a9e8f87def 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -551,7 +551,7 @@
>    MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> 
>    MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> -  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>    UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>    UefiCpuPkg/CpuDxe/CpuDxe.inf
>    OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
> index 196853740753..76934d354fa6 100644
> --- a/OvmfPkg/OvmfXen.fdf
> +++ b/OvmfPkg/OvmfXen.fdf
> @@ -298,7 +298,7 @@ INF  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>  INF  MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>  INF  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
>  INF  MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> -INF  OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +INF  UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
>  INF  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
>  INF  UefiCpuPkg/CpuDxe/CpuDxe.inf
>  INF  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
> diff --git a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.c
> b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c
> similarity index 100%
> rename from OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.c
> rename to UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c
> diff --git a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.h
> b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.h
> similarity index 100%
> rename from OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.h
> rename to UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.h
> diff --git a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> similarity index 79%
> rename from OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> rename to UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> index 3ad28a148c5b..4f2b4db9e5dc 100644
> --- a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +++ b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> @@ -1,6 +1,9 @@
>  ## @file
>  # Local APIC timer driver that provides Timer Arch protocol.
> -# PcdFSBClock is defined in MdePkg and it should be set by the consumer.
> +#
> +# This driver is to support fixed frequency. If a real platform happens
> +# to have fixed frequency, then it can be used. In this case the consumer
> +# should set PcdFSBClock which is defined in MdePkg.
>  #
>  # Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.<BR>
>  # Copyright (c) 2019, Citrix Systems, Inc.
> @@ -21,7 +24,6 @@
>  [Packages]
>    MdePkg/MdePkg.dec
>    UefiCpuPkg/UefiCpuPkg.dec
> -  OvmfPkg/OvmfPkg.dec
> 
>  [LibraryClasses]
>    UefiBootServicesTableLib
> --
> 2.29.2.windows.2


  reply	other threads:[~2021-11-22  3:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08  6:07 [PATCH V3 0/3] Rename XenTimerDxe to LocalApicTimerDxe Min Xu
2021-11-08  6:07 ` [PATCH V3 1/3] OvmfPkg: " Min Xu
2021-11-11 14:46   ` Anthony PERARD
2021-11-08  6:07 ` [PATCH V3 2/3] OvmfPkg: Switch timer in build time for OvmfPkg Min Xu
2021-11-08  6:08 ` [PATCH V3 3/3] OvmfPkg: Move LocalApicTimerDxe to UefiCpuPkg Min Xu
2021-11-11 14:47   ` Anthony PERARD
2021-11-22  3:04   ` Ni, Ray
2021-11-22  3:34     ` Yao, Jiewen [this message]
2021-11-23  8:24     ` Min Xu
2021-11-23  9:45       ` Gerd Hoffmann
2021-11-09  6:59 ` [PATCH V3 0/3] Rename XenTimerDxe to LocalApicTimerDxe Gerd Hoffmann
2021-11-09  7:03   ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW4PR11MB58729F4322D065BDB2BD54248C9F9@MW4PR11MB5872.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox