From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5B22DD811C7 for ; Mon, 15 Apr 2024 13:05:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=AMofIny/j7KNIGP+4GZ6o+lQl9a1F0UvSBgzJlk3VI4=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1713186302; v=1; b=lo0qjlz8NSo2rKMw7byUrbIyLXr93Y72ycwBoOcfWZHX/yLu96qwOlUep5HLPLQmsHpJoFiE a7Fd7cWv6xIuWcJHKDZZO6IyP5A2CbDxMhGSLn4VXFWsWDwVgBhTsfE5k+ft73Q+nk5fMUp7AM4 Cq14AsEOFmOYSU1T/tVToCKZyMWI1wvj6rBUGWm5JAQCrQ2GUk6f1kVhmJIawTYEyr1UWCHB2gm yu1hzN3j97I9n5IasNI41GRtauYPE/VINxyVOjy8izmIuv9hjalDDEYNd4+TQHtmccDvPw1eUiP vEi7X72H7/15MjsF4rji99LEXonMyH2cbqxfg4Ot+EW0Q== X-Received: by 127.0.0.2 with SMTP id O12CYY7687511xux5JrfZmQY; Mon, 15 Apr 2024 06:05:02 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web11.20601.1713186302082614547 for ; Mon, 15 Apr 2024 06:05:02 -0700 X-CSE-ConnectionGUID: RLxI7KAiR96jhjsh7/Xwtg== X-CSE-MsgGUID: t4OXKEscTbeaTvNGEZgAUg== X-IronPort-AV: E=McAfee;i="6600,9927,11044"; a="19135507" X-IronPort-AV: E=Sophos;i="6.07,203,1708416000"; d="scan'208";a="19135507" X-Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 06:05:02 -0700 X-CSE-ConnectionGUID: K6UyFrBHQ3uG4Qk42vxQCQ== X-CSE-MsgGUID: tlJj1M2fQ1OKNxqrGOHVJA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,203,1708416000"; d="scan'208";a="52859831" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Apr 2024 06:05:02 -0700 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 15 Apr 2024 06:05:01 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 15 Apr 2024 06:05:01 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 15 Apr 2024 06:05:00 -0700 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by DS7PR11MB7740.namprd11.prod.outlook.com (2603:10b6:8:e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26; Mon, 15 Apr 2024 13:04:59 +0000 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::b0c8:dcaf:59ea:9e99]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::b0c8:dcaf:59ea:9e99%6]) with mapi id 15.20.7452.046; Mon, 15 Apr 2024 13:04:59 +0000 From: "Wu, Jiaxin" To: Gerd Hoffmann , "thomas.lendacky@amd.com" CC: "devel@edk2.groups.io" , "Ni, Ray" , "Zeng, Star" , Ard Biesheuvel , "Yao, Jiewen" , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF Thread-Topic: [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF Thread-Index: AQHai99oFIlHXkFAQ0+HiVjxVR3nL7FpUJEw Date: Mon, 15 Apr 2024 13:04:58 +0000 Message-ID: References: <20240410135724.15344-1-jiaxin.wu@intel.com> <20240410135724.15344-4-jiaxin.wu@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR11MB6158:EE_|DS7PR11MB7740:EE_ x-ms-office365-filtering-correlation-id: b3fea2ce-e556-4cd0-88c1-08dc5d4ca791 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: ICJq7fhGBmMOq/7N+joLq/jw+9M4+mJTJN79CrCMZvLx9gBk9TbhVP02+IQ0D0XHkONyGD+h2acytcww20zDf+j0JP5zVg5vKw5t7DtDzhUK/TWeS2vAZJDdYbIGb4DrZ1o9hzqpE9DWxuZO4OFrd7RGgXReGdHxplERzv3OaKIIvwgxei3t8+9Qmse+qZGAt+xW5CJ6npARlrAbVM1iwYl4WIhusq5UY02HjPz/tXWHBxskr+fOAj9J3aXyoD9s2NOJlXl+mp7EWXLSSkrx0GYklzTzq35PBDrVcwV4r+JSP+NM/fn7MFVBfgqJU9bcjY8junriz1Bq5Y3uvNHleM9wUffkkm2BELTw0DmiRLKPoZBqTpEmiXB/1foALi6p4T0eTDEOW2E/aMyDdfA9UYrZkvHwEC3D9S22TS9eNaJucTBIsG5xx8XBaIurBIx1CPLZ9NBB/LA+abcVqpYUtu0l5rkeDyCy2/RkMHZATlCQc5yqod9DgpV7Q5f3fpJlzbytDEfr3Aiu8ObthconcRtQdXgIfJSRsDKcOAuz2nM0N329k3zWmbmuvvSi7YEx377W2/Wz1EJR+nmSuB5MwQpjgQBKD1WY7HIv08exw57vH29E7wPhUyapP4c8Jz4D9L9jF9dWd2romhUwF7eIYwdCwtE3K9liA/hA1hycGQK+OFQMaNMguCaqoOoYQZOI14niqHoYr+eH2QNcPbO/+6PtqnFVtVn19McFqgRKeYI= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RZlpLv1XOGj5H7TgDmq5W3Il4oF/CQY+G2w3ZJdeh+eiXF3eqMj3zGOIlupV?= =?us-ascii?Q?+c02JdPAg/VXbrPqY3Brat7/9a5IJZv07CQ5pytZzzlAk4I+AMfCDbRDTNzl?= =?us-ascii?Q?jpA9zt5SXH/S2QJeLge/i/zk0FX6buNVvPN3MEFpAL/CtXc2xJhkjt1KwTxD?= =?us-ascii?Q?mDvbcQSlLlx1lYY9+xJNwP11l2sdHVszWP1kthl1axEgE+RD3OvVP/5Vn82w?= =?us-ascii?Q?xl0py+8o4/k/zX+YmJbiWw7AcbFlhUGAxNEmBNhN6j6mVR9IBjUCJUjP6KVH?= =?us-ascii?Q?uq4bE568fgUpngznhWqHH4g+ovn1t0cz0NjdvLdFGj+W3VAMdon8rWtxEv1S?= =?us-ascii?Q?XXIWheVhqL+FCwzi3ox3Z7nAVZAbIdaCK4vrvXZCbPyDsXXEugdABZSFsh+a?= =?us-ascii?Q?RqFYx6Cmc3taT7yYqqYHU4Z7brAzT2h4aWE6SI0iA08zvJ51IrlBVARf2vmv?= =?us-ascii?Q?RZ4WfGCTr+RXoweIoaFqR6E8MS+A/Mbm9FRbCePB1/xIZukNA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4H8ERvE2f7FFTB9gDZDpENLmAEhluYU+?= =?us-ascii?Q?ZxEC67eb2zFgZiPKBro0IM0eXBbHgaLkcTsGm3deapC5UJlZiQt2UBHPxgau?= =?us-ascii?Q?lD9cCz4OEcoGxnKDxercJ5F2rMHA1RkiyUXhkBA2ib0RkgmodOTDf472Crtu?= =?us-ascii?Q?9qDV6KD0tYNfQWlGWc1gXDzAIEk0hFPzRNbo8i8w?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3fea2ce-e556-4cd0-88c1-08dc5d4ca791 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2024 13:04:58.9479 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1TRQXDm0+gb/B7eip5pLouPCP39cDW4TS0ZcsSUTcKRZqQTbmaSzdA/SBIYacBk3zVufCAlREZNJzug3i1exqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7740 X-OriginatorOrg: intel.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 Resent-Date: Mon, 15 Apr 2024 06:05:02 -0700 Resent-From: jiaxin.wu@intel.com Reply-To: devel@edk2.groups.io,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: BxVLijzHRVHtAEcDqy8B7mswx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=lo0qjlz8; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) Hi Gred, Because: 1) The mode of the CPU check is different between the AMD & OVMF. OVMF:=20 CpuSaveState->x86.SMMRevId & 0Xffff AMD: LMAValue =3D (UINT32)AsmReadMsr64 (EFER_ADDRESS) & LMA 2) Existing SmBase configuration is different between the AMD & OVMF. OVMF: AmdCpuState->x64.SMBASE =3D (UINT32)mSmBaseForAllCpus[CpuIndex]; AMD: =20 if ((CpuSaveState->x86.SMMRevId & 0xFFFF) =3D=3D 0) { CpuSaveState->x86.SMBASE =3D (UINT32)mSmBaseForAllCpus[CpuIndex]; } else { CpuSaveState->x64.SMBASE =3D (UINT32)mSmBaseForAllCpus[CpuIndex]; } This series patch won't change the existing implementation code logic, so, = we need override one version for OVMF. +AMD feature owner=20 Thanks, Jiaxin=20 > -----Original Message----- > From: Gerd Hoffmann > Sent: Thursday, April 11, 2024 3:11 PM > To: Wu, Jiaxin > Cc: devel@edk2.groups.io; Ni, Ray ; Zeng, Star > ; Ard Biesheuvel ; Yao, > Jiewen ; Kumar, Rahul R > Subject: Re: [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library > instance for OVMF >=20 > On Wed, Apr 10, 2024 at 09:57:14PM +0800, Jiaxin Wu wrote: > > Due to the definition difference of SMRAM Save State, > > SmmBase config in SMRAM Save State for OVMF is also different. > > > > This patch provides the OvmfSmmRelocationLib library instance > > to handle the SMRAM Save State difference. >=20 > Why ovmf needs its own version? Patch #4 adds an AMD version, and given > that KVM uses the AMD smram layout that library should work for OVMF > too, no? >=20 > take care, > Gerd -=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 (#117774): https://edk2.groups.io/g/devel/message/117774 Mute This Topic: https://groups.io/mt/105441992/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-