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 0E5F474003A for ; Wed, 10 Jan 2024 07:51:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Osz8hVS0UzSrjI7jZUKXQaAyvCeqKOhxcAE5WjeQlFE=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results: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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1704873105; v=1; b=KPA/i9DMiShQOu0QgFutHhrugLbB0wq6UxC53CdNfxCRj0qIxp7bZ4IUkcnWG6EhVvQMt0b8 EV1QFRI+Gs2l/slRh950/BL6z0QeHv/fLh1wiBhZl99apCcgf8DGxhB60C/i3QoBGHLXJpcuHoR lnEWVwEXTXg6bux241QUtsgU= X-Received: by 127.0.0.2 with SMTP id t9LEYY7687511xQFTo1Yw5fv; Tue, 09 Jan 2024 23:51:45 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.7291.1704873104771929230 for ; Tue, 09 Jan 2024 23:51:45 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="464840526" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="464840526" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 23:51:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="816262721" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="816262721" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Jan 2024 23:51:42 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Jan 2024 23:51:41 -0800 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 9 Jan 2024 23:51:41 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 9 Jan 2024 23:51:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gkg6MZ2Sdo2SFQ50AblxBognEDOZvLL9CcpTh39M3xA26m2txsOqppRthp8hIUv/4kxQ74AzicWhSs5YgIDsma//wyBw8HS10DquxSBvtLDnjl8lDI7uzYpjTzdRV8WW/unqvvE3P+pFELl+o4NNhsFyVIxzoivwcBUSTGZfH5+LRcuF1pRWUfSc1+Bry6lGv9oeFkGfbGVrlj7AWzbyDKbI/3f7Gqaq7q4tuKJCwz2SPAY1D8hw5PvkF28OpfGp6nuMAVJJ0D5r+VWvdt+iwO6SW2QpWzNtLE84TaLM/vIu7q1SBlohwi1UnyY7QhnJssEAmB8YQuaJ2ZxHHiiIuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pCQzyDBvW09VDWAs8LT1AaO7umbeMU3JuCtiIS8D3rU=; b=PJDLRyvubPdQ2lICztk3dVe4fQmj5wdpKuB3d1MXiG8Te1/3vaRk9HB3jaPViS70bL7PzzaaxS5/a91XKwellrqD91AYL5vsuEfgTggk2SX5uWbEOLMdmZ4Xlmb01SPS+A7Vg80C32P4tRjtocEkrj4uuBGchfFuYHCP1IQ6oNcinSO+MJ3ueTxHcU5yu/zL77CQqKpExUYzR97uTC5yxMWOSBqTwgZpYD+jgXoNEt2QukBIPDH0CUbR0am0x1hPEeGo8M0/b69e+hMi60z15UcK8QqkdxUVXWLypf5zOQw/HSCfyXn8yuEjrWrH4H5aK1Go53NZiOPXGV4/yMhk3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by SA0PR11MB4622.namprd11.prod.outlook.com (2603:10b6:806:9c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 07:51:34 +0000 X-Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::36e:4f3c:b08c:a372]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::36e:4f3c:b08c:a372%7]) with mapi id 15.20.7159.020; Wed, 10 Jan 2024 07:51:33 +0000 From: "Min Xu" To: "devel@edk2.groups.io" , "Ni, Ray" , "Wu, MingliangX" CC: "Yao, Jiewen" , "Xue, Shengfeng" , "Dong, Eric" , "Kumar, Rahul R" , "kraxel@redhat.com" , "De, Debkumar" , "West, Catharine" , "Xu, Min M" Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0 Thread-Topic: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0 Thread-Index: AQHZv6Y/U60BMGIetU+4xp3Iu3zPhq/Lzo4AgAx2CYCA+228MA== Date: Wed, 10 Jan 2024 07:51:33 +0000 Message-ID: References: <20230726094754.171-1-xueshengfeng@byosoft.com.cn> <177562550EF0534C.27380@groups.io> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5064:EE_|SA0PR11MB4622:EE_ x-ms-office365-filtering-correlation-id: 01f6f486-7a2e-41e3-6cc1-08dc11b0f727 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: nz564cOX8Y3gl54pcfdtKDyOC7wm8jWpU5LCwXvnx4qI05SVrTKZJAnqeA/W4ZCGJLjNJRAy7SORDaW5o+zxcfHyLcCfquWagqASKL6+MSDuZ9K13cN7hUpyz6GSVKzw3yQk1KW6dEdHJfEFw79HaGctuUe49aA27DpN8PHbrmn3McC7GvKCwV6hDGlBXwR4W8DhVAPtoh0iZfRbyFLERZDucJxnHUYWYSeBK+r6DLonVHLkO26BobxAikpCi/LMy6KQAgLqWbg7rVZZlfFuJJH72sBEqV7jPLVopc83ds3cz0FB+vQvB2qxDO+Khrk0ZFCsoeLf+MXbHOpz9wAdsSozzhb5FhREZCPUklqTwVRiIWihAo3Zj5g8aCNzBWrBEwD/YDTL8CWK1OZIPWKtLQLMRGdqP4UKshl7MgPvMvPuaJkKOBCRdf3vw4O3/SB+L/BTaX56U88T9EHK0LfkOC/E5OiuaRnTQmYBMQeyZ33r+8m3olMAhVSS3mMG5wfS5EyEhaKIAmXVal5ST5sT2qTACwm3YNYtyIF0XHQ4fZe2a/RIhCU8pF/MK+sAkMaLtsJlCv3EIfHtsxdGLn7NUF4k6pMSLYr1G3nvbNGJ4ew= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fWR/OvVVhKqxCCs1/wjPTGkPHRXbUOY36GEnvT3iFXBaBrytCtZJCkgs6/F6?= =?us-ascii?Q?TUHaHsBHLrYgAJhXwGp+8RcZ6XvhBYOPFsbq7ZsG+KBoiZSuosf9BjzB/Gp/?= =?us-ascii?Q?iE0O9hd+WkQQFNXXE7TcK5W6QF4GO/QYSVCH44GMQk/bQAPu3FLOFaff19Zg?= =?us-ascii?Q?lG9nqMuO7doisAndkBZWakc9InumkfUymbiEbtroxmImCsm3bmhrBv0kweGB?= =?us-ascii?Q?wt1Sb1BDs9UVwNpu26RsssI+BLL5O9raX0z8S2qm6xVyOYwKc2NgDuiu15mM?= =?us-ascii?Q?v0jjkJeVwj7kB3eeItdDVwa4Pd+lEEKHzihE2B1xV29E1rORouLN0vdjDNOM?= =?us-ascii?Q?+m4X3rPSEGaQP4j8J2mBYyQdwwGin8rGnfzm4kD7BtZa7Sc6fpthGoneUbOx?= =?us-ascii?Q?20+ah2pW+MmFel+khLCBGu6bGPk98+6G8rjv1I8M4uVZJ2j5YeI2gBVbB/Sf?= =?us-ascii?Q?KSo8k4uZXGkPdZJFK+MtMcJZc83YxKD9/TNLGjS+ZFffTa5tZs8tEQlJFZlz?= =?us-ascii?Q?eeLiRaBsEtr886VMA9SxyOBIfy7bkjbI4+BPakpwUTvq7qu5C7ThUbxt0BEU?= =?us-ascii?Q?gCZazHiErQ1vY3uRUeYpOh8ZOkexMhEI8qoLxNp+0ImKXBpvlAnK6cCHX/Oi?= =?us-ascii?Q?k2Xh7/khAnqpcfkaX1yKgBBvs+wUw3jEjlKgivmQUNk3hvfzhAL9pzxsDDlk?= =?us-ascii?Q?i30su6Fkl94aHsHOnpaGedAh7/6ysYfDANgcXZ/G1V23JcI8byDpPJyfzc0l?= =?us-ascii?Q?KLYaBLTS8IFbKB243Q3zejEgxsnf+Ha31y/fMz3XjkMF7OCAd6GBwDUeYyyS?= =?us-ascii?Q?UwdeK17ZAXzwJdQryKOWVi0wRHMWvECdlNaEggGR0CkHW+CqN1+neFuwYBas?= =?us-ascii?Q?PlqfSZuz3r9ak/Tl746Vzcy/spGZe4+5teVUuG7P2bU1YbGuheLinr3stv7k?= =?us-ascii?Q?d4QUCx23mzyCSWJ9vBNxs5EYW3NmUU72T8YJamm9hyIONynokg3AJ0RTKoXO?= =?us-ascii?Q?yBrm3qzp9eVKIBGrqXD++Q7Q/SXYi/xJSwieSrESRPJGW13bHKRbvSPSQHR7?= =?us-ascii?Q?gFz3P4BwzBd2Mqm9pFHOUIErSS9YeHg5flJMkoLuTgYmXht+IMknLYma2dDb?= =?us-ascii?Q?04d5QwWxtqDLx66yGveS461JSPEjVi1ByEbZkDSZ7Yqar4Ea1M5Nsz3OvyHt?= =?us-ascii?Q?KB1/sdSYokFMnioDMT3kEg7ScmrxfEGpivycZOPMf0VNZjFLWfjgxCx2+OU7?= =?us-ascii?Q?MJN644t41oLYUodj2t4t+4boq2KVS86cLbAENFdRXJh8cW+aqsJcKo6X6lm0?= =?us-ascii?Q?7IYwxSrTDmqKpkBqlhK13B/cse9OBMb7hpylcRKeQXr698tJpJ2gY4fHuQfQ?= =?us-ascii?Q?dNjexMPp4Qz0+kNeJ3CkHiN1pPYTIy/AHoBWXae+oYEuGXuWZMyshbt6vPXv?= =?us-ascii?Q?M7mb2KLjwWvQJoFHNWg2r0ggiKe20uWwa3ll2K4qiMalfuhjRaut9aOB5tlg?= =?us-ascii?Q?Buj96MleK7E4FGstpx8ihbiVYhMCzIxs3a069G6kE8Nygjevhz+Qv9cyRYLD?= =?us-ascii?Q?7C6b/9ESE9jQFLGFb9bS67glAGdc36pCe60ZzItp?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5064.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01f6f486-7a2e-41e3-6cc1-08dc11b0f727 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jan 2024 07:51:33.8205 (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: kWVlp8rtC0TKJhnont2Sejqxbqwrm21aLDSRSsc6c6WEJns/wODoKGBDOv693bDOWz4oU57sApddVtlsIrPfYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4622 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 Reply-To: devel@edk2.groups.io,min.m.xu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8YefpKR54UstGZ13Rt9BJQ75x7686176AA= 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=20140610 header.b="KPA/i9DM"; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") This patch causes a regression when launching a vm guest with below command= : $ /usr/libexec/qemu-kvm \ -name guestVM1 -machine q35 -accel kvm -m 10240 -smp 8 -cpu host -monitor p= ty \ -drive format=3Draw,file=3D/home/tdvf/centos-stream-9.img \ -bios /home/tdvf/OVMF.fd \ -nic user,hostfwd=3Dtcp::2222-:22 -nographic \ -object iommufd,id=3Diommufd0 \ -device intel-iommu,caching-mode=3Don,dma-drain=3Don,x-scalable-mode=3D"mod= ern",x-pasid-mode=3Dtrue,device-iotlb=3Don,iommufd=3Diommufd0 \ -device vfio-pci,sysfsdev=3D/sys/bus/dsa/devices/vdev0.0,iommufd=3Diommufd0= ,bypass-iommu=3Dfalse Commit e8aa4c6546 (this patch has been merged) clear the CD bit in CR0 when= transferring from real16 mode to 32bit protect mode. After the patch is ap= plied, it costs about 60s in DecompressMemFvs@SecMain.c.=20 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Thursday, August 3, 2023 4:14 PM > To: devel@edk2.groups.io; Ni, Ray ; Xue, Shengfeng > ; Dong, Eric ; Kumar, > Rahul R ; kraxel@redhat.com; De, Debkumar > ; West, Catharine > Cc: Wu, MingliangX > Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache > Disable should not be set by default in CR0 >=20 > The patch resolves an issue in Boot Guard enabled system that NEM is alre= ady > enabled by Boot Guard, disabling cache evicts all cache content which is > unexpected. >=20 > Reviewed-by: Ray Ni >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Ni, Ray > > Sent: Wednesday, July 26, 2023 5:56 PM > > To: Xue, Shengfeng ; > > devel@edk2.groups.io; Dong, Eric ; Kumar, Rahul R > > ; kraxel@redhat.com; De, Debkumar > > ; West, Catharine > > Cc: Wu, MingliangX > > Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache > > Disable should not be set by default in CR0 > > > > This patch is not right. > > > > Intel SDM explicitly says the initial CR0 value is 6000_0010. CD bit is= set. > > > > So the ResetVector code that still sets CD bit should be good. > > > > If you are facing NEM enable failure, can you change your NEM enable > > logic to explicitly clear CD bit instead of changing here? > > > > Thanks, > > Ray > > > > > > > -----Original Message----- > > > From: xueshengfeng > > > Sent: Wednesday, July 26, 2023 5:48 PM > > > To: devel@edk2.groups.io; Dong, Eric ; Ni, Ray > > > ; Kumar, Rahul R ; > > > kraxel@redhat.com; De, Debkumar ; West, > > > Catharine > > > Cc: Wu, MingliangX ; Wu > > > Subject: [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should > > > not be set by default in CR0 > > > > > > From: "Wu, MingliangX" > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4511 > > > > > > With 64 bit build we are seeing the CD in control register CR 0 set. > > > This causes the NEM to disabled for some specific bios profiles. > > > > > > Cc: Eric Dong > > > Cc: Ray Ni > > > Cc: Rahul Kumar > > > Cc: Gerd Hoffmann > > > Cc: Debkumar De > > > Cc: Catharine West > > > Signed-off-by: Wu, Mingliang > > > --- > > > UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > > b/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > > index f59fc6ead4ba..4af2e875c31c 100644 > > > --- a/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > > +++ b/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm > > > @@ -7,7 +7,7 @@ > > > ; > > > > > > ;------------------------------------------------------------------- > > > ----------- > > > > > > -%define SEC_DEFAULT_CR0 0x40000023 > > > +%define SEC_DEFAULT_CR0 0x00000023 > > > %define SEC_DEFAULT_CR4 0x640 > > > > > > BITS 16 > > > -- > > > 2.26.2.windows.1 > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20 -=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 (#113517): https://edk2.groups.io/g/devel/message/113517 Mute This Topic: https://groups.io/mt/100367559/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-