From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 520D07803CE for ; Tue, 16 Jan 2024 06:36:54 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=kXMF+4fjv+PuGEUiuOXsxHBbOo3OxdhSPhaCGdvl8F0=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1705387013; v=1; b=TtIzurtAqGELzYCG3XKeoxti+fIclZIh+qosKdrwYQeIRs16CB9CU+nGTZ1cWKcSBaVTPAmc bpQe+a+AUJ0IOAOPzEhNCGRx877hPcoS2bYELVtPW2iAiIUBkayy5BcnIDjTISb1CQkQ7Ss+vmh z8Cz1NqV7G0RwZhvr3g6YL0Q= X-Received: by 127.0.0.2 with SMTP id psoSYY7687511xxAkcyFxcoF; Mon, 15 Jan 2024 22:36:53 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.92956.1705347012802691312 for ; Mon, 15 Jan 2024 11:30:13 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-Vw3rbqlQM0mhohZaEkl1HA-1; Mon, 15 Jan 2024 14:30:10 -0500 X-MC-Unique: Vw3rbqlQM0mhohZaEkl1HA-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 393503830087; Mon, 15 Jan 2024 19:30:10 +0000 (UTC) X-Received: from [10.39.193.170] (unknown [10.39.193.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EAFF8492BC6; Mon, 15 Jan 2024 19:30:08 +0000 (UTC) Message-ID: Date: Mon, 15 Jan 2024 20:30:07 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 1/6] UefiCpuPkg/LocalApicTimerDxe: Duplicate OvmfPkg/LocalApicTimerDxe driver To: Pedro Falcato , devel@edk2.groups.io, ray.ni@intel.com Cc: Michael D Kinney , Nate DeSimone , Rahul Kumar , Gerd Hoffmann References: <20240115080325.147-1-ray.ni@intel.com> <20240115080325.147-2-ray.ni@intel.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1nBtXyTLKxURJjQlp0iWjHo0x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=TtIzurtA; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/15/24 09:59, Pedro Falcato wrote: > On Mon, Jan 15, 2024 at 8:04 AM Ni, Ray wrote: >> >> This commit only duplicates the OvmfPkg/LocalApicTimerDxe. >> Following commits will enhance the driver. > > Hi, > > Please describe why you're doing this change. i.e what's your use case > for LocalApicTimerDxe, Right, I have the same question -- although, admittedly, I've not been CC'd on the cover letter (0/6), and the reason could be captured there. (I'm not going to check my edk2-devel folder again today, only finishing up my personal INBOX. So tomorrow when I check edk2-devel, I might actually find the reason in the cover letter.) On a second thought, I'm (retroactively?) surprised that LocalApicTimerDxe was (apparently?) first introduced under OvmfPkg -- i.e., for VMs? That's not impossible, but feels a bit strange. > and why are you duplicating this instead of > moving OvmfPkg's (why do we need to maintain 2 separate versions of > what is essentially the same driver)? Not wanting the NestedInterruptTplLib dependency / functionality in UefiCpuPkg's instance of this driver seems justified (patch 2). Also, patch 4 calculates the timer frequency based on CPUID; might not be straightforward to use on VMs without prior verification. The tricky parts to review in this series are the math in patch 4 (such code is usually prone to integer overflows, so that's my concern by default there), plus the big comment in patch 6. I'll try to look at them later. Meta-comment for Ray: patches like patch#1 are best formatted with the option "--find-copies-harder" (try it please, the output speaks for itself). Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113847): https://edk2.groups.io/g/devel/message/113847 Mute This Topic: https://groups.io/mt/103734961/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-