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 84B12740034 for ; Mon, 13 Nov 2023 18:14:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=hCyM73xUo3gyHxzRGwue7CIeMehkb1LEJrp3Dm+RbL4=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To: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=1699899288; v=1; b=k+YiMYnNDPlXn+CvC6CEmz2e/d7HcIfiJ2EQzdDl9WQsZ9YlpwGz0zDLA8W5qBHnfrGpmEZ/ E3fRUc5wr+3GRlRFK7+OtljSQODoquvzmoK0A4hoLAGIQKIan8oh3PNSJ5SEip6hUuG2v3yJYiu 58dqyNMm0cjy6SvaAKRv+CkM= X-Received: by 127.0.0.2 with SMTP id syXIYY7687511xyObkaz2S2m; Mon, 13 Nov 2023 10:14:48 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.2708.1699899287503874174 for ; Mon, 13 Nov 2023 10:14:47 -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-546-PNP41AM7NH2qxC7bBVfIGg-1; Mon, 13 Nov 2023 13:14:43 -0500 X-MC-Unique: PNP41AM7NH2qxC7bBVfIGg-1 X-Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 3E6AA3810785; Mon, 13 Nov 2023 18:14:43 +0000 (UTC) X-Received: from [10.39.192.220] (unknown [10.39.192.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B626F492BFD; Mon, 13 Nov 2023 18:14:42 +0000 (UTC) Message-ID: <5da576e6-4186-1437-53f0-9b9ea8ce0d30@redhat.com> Date: Mon, 13 Nov 2023 19:14:41 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v4 0/5] UefiCpuPkg: Add macro definitions for CET feature for NASM files. To: devel@edk2.groups.io, w.sheng@intel.com References: <20231113062245.649-1-w.sheng@intel.com> From: "Laszlo Ersek" In-Reply-To: <20231113062245.649-1-w.sheng@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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: qLyzgpp7JsJWd1X0HIvfCz8Px7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 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=k+YiMYnN; 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 11/13/23 07:22, Sheng Wei wrote: > Patch V4: > Separate the changes to 5 patches. > 1) Add macro definitions for CET feature for NASM files. > 2) Use macro CR4_CET_BIT to replace hard code value in Cet.nasm. > 3) Use CET macro definitions in Cet.inc for SmiEntry.nasm files. > 4) Only change CR4.CET bit for enable/disable CET. > 5) Backup and Restore MSR IA32_U_CET in SMI handler. > Remove some unused code. > It is no need to clear MSR IA32_S_CET, > because clear CR4.CET bit will disable all CET functions. > Since CET is disabled between clear CR4.CET and run 'rsm', > it is no need to delay MSR IA32_S_CET restoration. >=20 > Patch V3: > Remove the 3rd patch. mSmmInterruptSspTables is a global variable. > It is unnecessary to initializ it to zero manually. >=20 > Patch V2: > No function change with Patch V1. > Split the patch to into 3 separate patches. >=20 > Sheng Wei (5): > UefiCpuPkg: Add macro definitions for CET feature for NASM files. > UefiCpuPkg: Use macro CR4_CET_BIT to replace hard code value in > Cet.nasm. > UefiCpuPkg: Use CET macro definitions in Cet.inc for SmiEntry.nasm > files. > UefiCpuPkg: Only change CR4.CET bit for enable and disable CET. > UefiCpuPkg: Backup and Restore MSR IA32_U_CET in SMI handler. >=20 > UefiCpuPkg/Include/Cet.inc | 26 +++++++++++++ > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm | 5 ++- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 39 +++++++++++-------- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm | 5 ++- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 40 +++++++++++--------- > 5 files changed, 78 insertions(+), 37 deletions(-) > create mode 100644 UefiCpuPkg/Include/Cet.inc >=20 series Reviewed-by: Laszlo Ersek -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111173): https://edk2.groups.io/g/devel/message/111173 Mute This Topic: https://groups.io/mt/102556832/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-