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 44464AC0A92 for ; Tue, 16 Jan 2024 05:51:00 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cAruBqwpLRdai9c0azXBfpS4KSAK2hXji9k4oTeTd80=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1705384259; v=1; b=XNgF/E2FnJA56WnRQyAPwjhHqhbE77HNelM91d7KaM8JiqnZ+7dW6yeaJiN9Ueh0u8a6FTEu MtMy00YnmhjndON7p5yHQsb6I3NnimLSq4VnOmB9qg+xsAc5O2jRFE7bGKZsBTmdCcOYt9AwaFu C5Xq5I8rrGeyQNznOuEJHzf8= X-Received: by 127.0.0.2 with SMTP id gJVdYY7687511xMsUEAjhQsP; Mon, 15 Jan 2024 21:50:59 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mx.groups.io with SMTP id smtpd.web11.72208.1705305855278622364 for ; Mon, 15 Jan 2024 00:04:19 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="6313695" X-IronPort-AV: E=Sophos;i="6.04,196,1695711600"; d="scan'208";a="6313695" X-Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 00:04:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,196,1695711600"; d="scan'208";a="25402232" X-Received: from ray-dev.ccr.corp.intel.com ([10.239.158.139]) by orviesa002.jf.intel.com with ESMTP; 15 Jan 2024 00:04:17 -0800 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Michael D Kinney , Nate DeSimone , Laszlo Ersek , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [PATCH 2/6] UefiCpuPkg/LocalApicTimerDxe: Remove NestedInterruptTplLib call Date: Mon, 15 Jan 2024 16:03:21 +0800 Message-Id: <20240115080325.147-3-ray.ni@intel.com> In-Reply-To: <20240115080325.147-1-ray.ni@intel.com> References: <20240115080325.147-1-ray.ni@intel.com> MIME-Version: 1.0 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,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zCUFeOI9FSVoTHfRFTFOF9oAx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="XNgF/E2F"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.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 a086f4a adds NestedInterruptTplLib call in OvmfPkg/LocalApicTimerDxe to avoid stack overflow due to interrupt storm in VM guest. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2815 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4162 The interrupt storm only happens in VM guest environment when the VM is heavily loaded. The UefiCpuPkg/LocalApicTimerDxe at current stage does not support the VM guest environment. So, this patch removes the NestedInterruptTplLib call. Signed-off-by: Ray Ni Cc: Michael D Kinney Cc: Nate DeSimone Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c | 11 ++++------- UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf | 4 +--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c b/UefiCpuPkg/= LocalApicTimerDxe/LocalApicTimerDxe.c index 67f4dcde37..f36a0e6bf3 100644 --- a/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c +++ b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c @@ -1,15 +1,13 @@ /** @file=0D Timer Architectural Protocol as defined in the DXE CIS=0D =0D -Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2005 - 2024, Intel Corporation. All rights reserved.
=0D Copyright (c) 2019, Citrix Systems, Inc.=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D =0D -#include =0D -=0D #include "LocalApicTimerDxe.h"=0D =0D //=0D @@ -60,10 +58,9 @@ TimerInterruptHandler ( IN EFI_SYSTEM_CONTEXT SystemContext=0D )=0D {=0D - STATIC NESTED_INTERRUPT_STATE NestedInterruptState;=0D - EFI_TPL OriginalTPL;=0D + EFI_TPL OriginalTPL;=0D =0D - OriginalTPL =3D NestedInterruptRaiseTPL ();=0D + OriginalTPL =3D gBS->RaiseTPL (TPL_HIGH_LEVEL);=0D =0D SendApicEoi ();=0D =0D @@ -74,7 +71,7 @@ TimerInterruptHandler ( mTimerNotifyFunction (mTimerPeriod);=0D }=0D =0D - NestedInterruptRestoreTPL (OriginalTPL, SystemContext, &NestedInterruptS= tate);=0D + gBS->RestoreTPL (OriginalTPL);=0D }=0D =0D /**=0D diff --git a/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf b/UefiCpuPk= g/LocalApicTimerDxe/LocalApicTimerDxe.inf index 6c711bd163..874d58fa17 100644 --- a/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf +++ b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf @@ -2,7 +2,7 @@ # Local APIC timer driver that provides Timer Arch protocol.=0D # PcdFSBClock is defined in MdePkg and it should be set by the consumer.=0D #=0D -# Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.
=0D +# Copyright (c) 2005 - 2024, Intel Corporation. All rights reserved.
=0D # Copyright (c) 2019, Citrix Systems, Inc.=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D @@ -21,13 +21,11 @@ [Packages]=0D MdePkg/MdePkg.dec=0D UefiCpuPkg/UefiCpuPkg.dec=0D - OvmfPkg/OvmfPkg.dec=0D =0D [LibraryClasses]=0D UefiBootServicesTableLib=0D BaseLib=0D DebugLib=0D - NestedInterruptTplLib=0D UefiDriverEntryPoint=0D LocalApicLib=0D =0D --=20 2.39.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113801): https://edk2.groups.io/g/devel/message/113801 Mute This Topic: https://groups.io/mt/103734962/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-