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 A15B87803D9 for ; Mon, 22 Jan 2024 19:12:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Guz/fa95Aq2vhJeAkx3Tt+KfK7bU5IPVq7e7AeIE+B8=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:To:CC:References:From:Organization:In-Reply-To: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=1705950745; v=1; b=dlY/p60pLhCcQfWRaA5evqbAUaPRz3/vCb1if+MiY5L1tKv+9bPJ9AqRMRaDRIqV229tyiKv MO+x9VpEylLCVJMngIuJlUmArufzVSR0fLQqsVq8t2rM0pDsi6Te+MM7+lcj48TUHs2d8A8VW0Z u9qSvJeIA029nk2s3Yr/EA8U= X-Received: by 127.0.0.2 with SMTP id v08gYY7687511xLyXewanGbG; Mon, 22 Jan 2024 11:12:25 -0800 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.1156.1705950744483616801 for ; Mon, 22 Jan 2024 11:12:24 -0800 X-Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40MF2qWW000891; Mon, 22 Jan 2024 19:12:04 GMT X-Received: from p1lg14879.it.hpe.com ([16.230.97.200]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3vspn1myh8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jan 2024 19:12:04 +0000 X-Received: from p1wg14926.americas.hpqcorp.net (unknown [10.119.18.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14879.it.hpe.com (Postfix) with ESMTPS id 360F8130D8; Mon, 22 Jan 2024 19:12:03 +0000 (UTC) X-Received: from p1wg14925.americas.hpqcorp.net (10.119.18.114) by p1wg14926.americas.hpqcorp.net (10.119.18.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Mon, 22 Jan 2024 07:12:02 -1200 X-Received: from p1wg14921.americas.hpqcorp.net (16.230.19.124) by p1wg14925.americas.hpqcorp.net (10.119.18.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42 via Frontend Transport; Mon, 22 Jan 2024 07:12:02 -1200 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Mon, 22 Jan 2024 07:11:57 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fa00xbh7R9gwknHzgjNV03aHdc8Y8KIfQD6K5eaczRUQ5pOJmY/egtj+BH2Oj2Xxj9QDkXD8pqKTo5GI3l7SxRrLzvjU6NNXLTWyBGu89Zb6uP+11ZqG2dBB+PjmYEK0EL3A7O0p2ZYMv9acn1pv8CiKhYN2IYBRqcsxDGKEHoi2uob+SFGXUc9IQ0GW0OCLZUBWxojj43MR9wH3jOAU3wWWcCuPutaRiccYIWoc7ieBbLWR/T6qw0FzQHMB+3tnVX2d2v6a5fJml3ie1yHJqHL9tzfQQF/Tji/+2gnqPDV8IXf+Z6BdoNymsWhHc/Yi1dGtMW7xYf5jkbIADvru4w== 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=JLb4edBbN/4K+jWh+TDJI14Z8s50Toa4UgF7bhtH7h8=; b=eTNvpV4RvfE1UHrq3JrkVZ5i6DLI6rqIv47eU18ki0MBqCDUaHOPq0i1kGw8pexMuKmJ5ls3fyByRYhMGST0Thc4JfTjztvKhjYth+sZAZPA58I85OzNoBCXxXaa3tpSR3w4KBK+nRkBk518mHS+PtqD7YJccP0eP2xOsnqxODLdiKTcUvxdeVfVEv0pjAwpfs0e+a18eXj3MytKrr/tkzjpX9l8TW1XjHt1Kifj1M9wmtULFiqq0a8HF9XG5Os7IHaxCo9r3S2o3H5hJ9n6I02ijB/9dnS0mb/x8YGKetwEJ7o+SshvgAqPl4k1cpyMB32/lGwvsgaZAMD4X0zuvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none X-Received: from MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1c0::21) by EA2PR84MB3812.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:250::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 19:11:55 +0000 X-Received: from MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM ([fe80::343b:e3c9:23f6:57f2]) by MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM ([fe80::343b:e3c9:23f6:57f2%7]) with mapi id 15.20.7202.034; Mon, 22 Jan 2024 19:11:55 +0000 Message-ID: <3505f62e-cc54-490e-983f-7b4312e41509@hpe.com> Date: Mon, 22 Jan 2024 13:11:52 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0 To: , , "West, Catharine" CC: "Xu, Min M" , "Ni, Ray" , "Wu, MingliangX" , "Yao, Jiewen" , "Xue, Shengfeng" , "Dong, Eric" , "Kumar, Rahul R" , "De, Debkumar" References: <20230726094754.171-1-xueshengfeng@byosoft.com.cn> <177562550EF0534C.27380@groups.io> From: "Brian J. Johnson" Organization: HPE In-Reply-To: X-ClientProxiedBy: CH2PR05CA0069.namprd05.prod.outlook.com (2603:10b6:610:38::46) To MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1c0::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW5PR84MB1354:EE_|EA2PR84MB3812:EE_ X-MS-Office365-Filtering-Correlation-Id: c463a29a-e7dd-4a51-94bb-08dc1b7dffe1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: pYmc/uV92U8t+74E2WYZTtaOH82Oe314rY+U8EYG+n4H5ybhsvWUK5I6kaIqmU7H4LtEhCSbUYYiHZ7BavQIZ/LDKbh3bVMwitIGhTwBXZeItimcy32LbxCMHImBx/Y45XRoKCvKFiB9CShBXpapPgcaS1T+VrJMHUOJpRkvaS+1YF0cwxlTU+OUQJqyHvP8J8ykUaHHsyFHz5VUv4Fa/nDTZeo6THwYokukPkwWD4stwKGzr7g5qkElmErR26MKy6a7SHgJypGzpvWT0b9N4Lq4lGBHYtTQwbfXKqiHfQZG/jclF2CucmJ0WZmd/w6VNVrLlPe8A74IrckwnkwlSCUzka3Rw2LwED8onj1D0oOAaZpIJ/UVEa/3M8dnSxW6MsO9mhIu49qF5hHZ0GG+wtYSJzhZegQShde1c4+1XlWd3lVHf/NyXeyxBI2YIdGZtipEiTRsNUipKVZqdLGhPy7q7sKjv96aU0eEg/PNksanxPGY/vw9X9w/ZYxa4GJNSBsXfF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FkbHJL?= =?utf-8?B?ZlVJSkZFdmhKcXpjcVFIdytsbGJnaU5FQkdpOEFiQ3YrMmpMVTVRRjc5UzFo?= =?utf-8?B?dDdiNVFOTzAyOGlBYTZYMjlibUdpQ3I4OWx2K3YrMkZMdlYzQVUvYjlRajhI?= =?utf-8?B?VHJ1TXNXdVU1cHhlb0p6cCtwck5oYkhjcy81Mk9vV2R2YTBXU3dtRXVjY3ls?= =?utf-8?B?S1BaY1crMnczSEdndzNvQUtMUlcyOWM0K1pQam9TVG9Yd2cyZ2FpM3pQRTYr?= =?utf-8?B?YmZjWGVxTDZTUjlnWHpZRkY2QnVyUG50Ylk4ZWpVeitOUDdhQnVVTUhUVnpO?= =?utf-8?B?Njl3cE9uSi9heDlWSTJiZGpEcEozRnIvME5mdzRHTVRtQ1RxdGp2c0dsVjFC?= =?utf-8?B?YmQyZmxmS1ZEbkJGZTVFajRyMExCSU5yZk92dHVQUW1FTTJ4WmtFRTM3UjNB?= =?utf-8?B?Ri9GcWlkSWs3OEs2SEhMZk1PaXhtNGtJRDc5UU1Nc1I2dlRQMWkxNjZPYzFh?= =?utf-8?Q?KiTknYfOFAr8RDzOYWyPAUpFe?= X-MS-Exchange-CrossTenant-Network-Message-Id: c463a29a-e7dd-4a51-94bb-08dc1b7dffe1 X-MS-Exchange-CrossTenant-AuthSource: MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 19:11:55.9030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9e9gS+JtKxQiLxFbsD1ud2yGTR+7oAeWLZVTLaWKREBDVKYwq/KnWq11TFQ8y9n8Rcmm4dtJZmNjvm/KoOYfYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: EA2PR84MB3812 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: SjQ3I-YippG-g6TcUJMCsrhRE_qQx4Ui X-Proofpoint-ORIG-GUID: SjQ3I-YippG-g6TcUJMCsrhRE_qQx4Ui X-HPE-SCL: -1 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,brian.johnson@hpe.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: C1bHVQBwOK7x1FWqfdfXlUcEx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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="dlY/p60p"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=hpe.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/18/24 09:46, Gerd Hoffmann wrote: > On Wed, Jan 10, 2024 at 04:43:47PM +0000, West, Catharine wrote: >> Disabling cache by default results in violation of BTG protections (if B= TG enabled). >> =20 >> BIOS cannot assume that cache is disabled before it executes as ACM may = be required to enable NEM. >> >> Whatever solution needs to be done here cannot evict ACM-enabled NEM. >=20 > Well, it's OVMF in a virtual machine. No boot guard involved. > So we could probably go for a OVMF-specific patch here. >=20 > But I'd prefer to figure what exactly is happening here before going > down that route. An extreme slowdown just because we flip that bit > doesn't make sense to me. >=20 >> Why is boot time increasing? >=20 > Not clear. It seems to be the lzma uncompress of the firmware volume > in rom / pflash which is very slow. Also it is apparently only > triggered in case pci device assignment is used. I've seen extreme slowness on physical platforms when we've mixed up the=20 MTRRs or page tables, causing code to be mapped uncached. Lzma uncompress of ROM could be pretty slow as well, if the ROM is being=20 read uncached. Lzma probably reads the data a byte at a time, which is=20 the worst case for uncached accesses. Since this is a VM, it's not=20 actually uncached at the hardware level, but I don't know how QEMU/KVM=20 handles uncached guest mappings.... It may be doing a VMEXIT for every byte= . Anyway, I suggest double-checking your page tables and MTRRs. --=20 Brian J. Johnson Enterprise X86 Lab Hewlett Packard Enterprise -=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 (#114145): https://edk2.groups.io/g/devel/message/114145 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-