From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id D0981740032 for ; Fri, 26 Apr 2024 19:52:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=igzTz1v7ULUWWkg8aOZSNXMXd0N/bhvud0K8OPhuT0M=; c=relaxed/simple; d=groups.io; h=Received-SPF:Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1714161132; v=1; b=oVXPIu9jHuQueb522iiXMElEFO+TtLQYptFDs6lQZoOpqCUnbenKtYUNYGd/2ha9DydMe6Hy 3pzjSzEe6WJ/y1toO9HWOuEOwC4jMi+3XK7u8Oo8ORa+pGLWQaI3AY3UDIiZ7xn2EDIyboiar1P gMOmdZatkaVba3r5JShMSFyMpX3W52IAorQMoq//ioYTnGMUmD5EcL3+so4vXPnFEh8HQnEJQgp 0mkopvp+qhdJzdxULvXgUkO70N+HG2lAPCp6fXyufgHgCbokM0ioGNsaMIlhZ8JCZGsbILS7h6G 2bkgk1XMOx6Hvxv5cVgOVfXwWrSrY+PXfUrxnpgtXAM2w== X-Received: by 127.0.0.2 with SMTP id Ud2OYY7687511x5xIzCvs2zX; Fri, 26 Apr 2024 12:52:12 -0700 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.57]) by mx.groups.io with SMTP id smtpd.web10.5314.1714161131708663162 for ; Fri, 26 Apr 2024 12:52:11 -0700 X-Received: from MN2PR18CA0017.namprd18.prod.outlook.com (2603:10b6:208:23c::22) by SA3PR12MB7999.namprd12.prod.outlook.com (2603:10b6:806:312::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Fri, 26 Apr 2024 19:52:09 +0000 X-Received: from MN1PEPF0000ECD9.namprd02.prod.outlook.com (2603:10b6:208:23c:cafe::ed) by MN2PR18CA0017.outlook.office365.com (2603:10b6:208:23c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.29 via Frontend Transport; Fri, 26 Apr 2024 19:52:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by MN1PEPF0000ECD9.mail.protection.outlook.com (10.167.242.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Fri, 26 Apr 2024 19:52:08 +0000 X-Received: from localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 26 Apr 2024 14:52:08 -0500 Date: Fri, 26 Apr 2024 14:51:26 -0500 From: "Roth, Michael via groups.io" To: Ard Biesheuvel CC: , Tom Lendacky , "Erdem Aktas" , Jiewen Yao , Min Xu , Jianyong Wu , Anatol Belski Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg: Don't make APIC MMIO accesses with encryption bit set Message-ID: <20240426195126.m3gsmdsy6xjcbj76@amd.com> References: <17C9D8CD7CA10EA1.16940@groups.io> <20240426141610.twbkphynyexgjad7@amd.com> MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECD9:EE_|SA3PR12MB7999:EE_ X-MS-Office365-Filtering-Correlation-Id: 1880e957-4ead-4866-52ea-08dc662a5b89 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?CJII5zdslwNDPLc3QV3RPin1BpgL7X7QemPiMYaEFel9HHf0qVq25c18XWGs?= =?us-ascii?Q?okWgudGhd0TApaNKIY8JgRIdVpZ4+EHfGO3LVOpZzNTVhhhtu4BvViAeV3dO?= =?us-ascii?Q?BN36x8eTCeGLum+7xqI6kk4YZHAP3ToVSHqYSxsXacd9hzUDvPZLsw2JA869?= =?us-ascii?Q?HqbtJ3HL6RKMXvc/QRkkqRIrVLkK62iN1bpyb8C3I0yVUBoFEhBurVrSWpH/?= =?us-ascii?Q?awaDIeDPcxaA1x550VGVgtg+6/4lRkwkEzOcriMe789ZJGx+4oLekrJA6hmf?= =?us-ascii?Q?fkKDHLIHJoBYAK8hKPbPx3IJergTT1m/sQ5GDlrOUvIFgR7uC6nBWgZP0/BN?= =?us-ascii?Q?vMwgN8ez2tZSRSf5ya5M8PLHbh4IxGQevDVmvjly/Ti+C8BRBeMOrROL6ckH?= =?us-ascii?Q?WVTW3jiBIYlN3Gmg620yLyiVO1KCfE0YbY6BBnN0TeKtsDhzrirMFag5D32V?= =?us-ascii?Q?zzJQHKlhoDhSoysShsFMhoutDozJdODwCTXXixTm8IYOaAmQbdzzR7wP6a/p?= =?us-ascii?Q?obwg/0m5q4mgN8+PJq+HR3kai+AgWyTDS+VnDZz14a+QC5906EmoGuco2yg3?= =?us-ascii?Q?NAK+DEY7ccL4YWOcX7peeO4/TECwcxjhLWyEcRQWmqnMB0BNxj1tc3qYRwLA?= =?us-ascii?Q?e2Fgw6KYcPYpKfBUBW6eQTpFWbeqB8XLpvLsUjCBPRFNlXCB2VHMDU1QhdOw?= =?us-ascii?Q?ezcsFdymN1TujV+24edfL+MiShbG7/GcdWpHozDSsZ2lETATGu1lsbIN9Qza?= =?us-ascii?Q?NoetMAJiW0zzKSDz4den21bgYKw+K9Jc28yNJYS+swuPO7IbIhCWHFYav54S?= =?us-ascii?Q?9JeaxLSDUDTvsfaSAKN8bm664gsScOZbV80q0w2Mf81AHB8p0IsSczyklShV?= =?us-ascii?Q?yphEKXO3NiL/lqEaMc0LWzYm0VOu/UHTI8LTyGX7h1x4fnpxUlGuPTvcTAQc?= =?us-ascii?Q?j+VVpQ7waLrd5+LlIA9cVtCQANgpQF9BssfSwbcENTsXh8nc+zoFHr1LQZ+X?= =?us-ascii?Q?iIx0M94lXJaURRHYYZkq6RJB8W7HHBulvM4+MG6G8HyA9+l0lWXqHB7Yr2W5?= =?us-ascii?Q?MYn9SOdMrYqsESenIWGAGK1PoRqCp2/ooxylex6c3m9VgT1oj9/EGAeALBVV?= =?us-ascii?Q?h1/+DpGNUgJ6pL4KbC1IB85aCGuedS9XcAx85HwzJILWMv5Hz9mOuno0vnza?= =?us-ascii?Q?P5m2OfUSpCRAAksdhHWsZLB2aDNLh+XX0pQURfxN77F5uHU0N25+lxNDkUYf?= =?us-ascii?Q?t2Ef/lx80sYv/f72yx1fHqFzJ1LBKebWgqwHwrsntRzn2NUJWuq0b3DNq4Ra?= =?us-ascii?Q?OLb7ReH1NGru0qOPd5psfMYhLQ1WkUMssGtPQ6gF8DZROuZLdycqIWbqBN+T?= =?us-ascii?Q?FiRlqXikRxUvwP5xrq3cp1BseagY?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2024 19:52:08.8903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1880e957-4ead-4866-52ea-08dc662a5b89 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MN1PEPF0000ECD9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7999 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: Fri, 26 Apr 2024 12:52:11 -0700 Resent-From: Michael.Roth@amd.com Reply-To: devel@edk2.groups.io,Michael.Roth@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8co4IhyTMYC729S00Gli5BkRx7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=oVXPIu9j; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On Fri, Apr 26, 2024 at 05:25:15PM +0200, Ard Biesheuvel wrote: > On Fri, 26 Apr 2024 at 16:16, Roth, Michael via groups.io > wrote: > > > > On Fri, Apr 26, 2024 at 08:51:20AM -0500, Roth, Michael via groups.io wrote: > > > For the most part, OVMF will clear the encryption bit for MMIO regions, > > > but there is currently one known exception during SEC when the APIC > > > base address is accessed via MMIO with the encryption bit set for > > > SEV-ES/SEV-SNP guests. In the case of SEV-SNP, this requires special > > > handling on the hypervisor side which may not be available in the > > > future[1], so make the necessary changes in the SEC-configured page > > > table to clear the encryption bit for 4K region containing the APIC > > > base address. > > > > > > Since CpuPageTableLib is used to handle the splitting, some additional > > > care must be taken to clear the C-bit in all non-leaf PTEs since the > > > library expects that to be the case. Add handling for that when setting > > > up the SEC page table. > > > > Tom just noticed another spot where a non-leaf C-bit needs to be cleared > > (the one mapping the GHCB page). It doesn't affect patch functionality > > but should be included for completeness of this change, so will send a > > quick v3 with this addressed. > > > > -Mike > > > > While at it, could you please fix your email setup and use 8bit > transfer encoding instead of quoted printable? Also, please put me on > cc so I don't have to apply the garbled groups.io copy. I'm not sure why git send-email seems to be defaulting to "quoted-printable", but I've set sendemail.transferencoding=8bit and that seems to have resolved things. Thanks, Mike -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118350): https://edk2.groups.io/g/devel/message/118350 Mute This Topic: https://groups.io/mt/105750506/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-