From mboxrd@z Thu Jan 1 00:00:00 1970 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.web09.1810.1634249489151436516 for ; Thu, 14 Oct 2021 15:11:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=y5i+iMXO; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.237.57, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mj4XeTqyi96wm65gMI66FhV0CzyDWHELWFn9CVGqmlV5MSRV7wJcUHO5OXfPOBcXdyg0DBVrCSt1WC5Oljr+Y7gTaTxgv8aHlyZd8q8yJElqM3c+Zlk7bbaxCa4OR8FTziVOpGlQhz83JBCM5GRNWY2QTDzebo3ogQqgkP2dDiqXgDuI0ZBhSkuAU1GpXu7mtjP+SmSGkw6GaMvDGmpQ6qy5vW8aWcN/c7FUeXv3TAN2hotvTHfJeu7II0EhtlhlhOj9ahSVwdUu4Z4UxfSlM8fPaYywFhiLEOcsIomcDQ27k2RTE5POsK2gG5ccYvI9uXkVFPp3Ll8X9zYQfKBxWA== 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=jzzFRn2uN0j6zwTagzqY2w1wCWGaipjaA80hc2w1mkM=; b=KeXpdr7BIl2xceBy2T6Wic5UCLEheoAGpu0AkM9Hd4mR2j4mmOCHP/kfQMU8UTkBxYbBsXZq9DzDGJZcivFH0OJj/96uEgKVH98d+SHPR4zeg+oXhLe6mNONWjDJvBiVL0wPx/VTDxqlpAf4WoX1gVXHhgu8YCusa9OBFg+lodtZx+mvkFDkF2PjBEIoZZcO32jQPlsBgPI7Gdn9bboatOtl2Fi7/Rs4AaWcGe2+aFfdH36tXTFTQToJ6oXlUkAUl/l8esycQuPonqcBd4Qxx6RlGe6lhUHwrpynZm6mavTy5xnM33XzNKfANsiEePSn9vr3y7YGAyJKsxlrDYmAAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jzzFRn2uN0j6zwTagzqY2w1wCWGaipjaA80hc2w1mkM=; b=y5i+iMXOR5bJqk//wXR45MRDU5tL8+l0u55QNq31ymVwOE+O7FQ7Thwu08K48vJs8qPiQUvgxGQYS3iu7IyWkpSr0f9/ITi4bj+4MdOZ4yth7okNwun+z53pfT0iYvkNDKOGJrJw4G5rkxGWWh5zqezykS+mDEm40Vchi+geN2g= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SN6PR12MB2782.namprd12.prod.outlook.com (2603:10b6:805:73::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 14 Oct 2021 22:11:27 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3%6]) with mapi id 15.20.4587.026; Thu, 14 Oct 2021 22:11:27 +0000 Cc: brijesh.singh@amd.com, devel@edk2.groups.io, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth Subject: Re: [PATCH v9 30/32] OvmfPkg/PlatformPei: mark cpuid and secrets memory reserved in EFI map To: Gerd Hoffmann References: <20211013165713.727815-1-brijesh.singh@amd.com> <20211013165713.727815-31-brijesh.singh@amd.com> <20211014085851.e5xtspfcyz75lgog@sirius.home.kraxel.org> From: "Brijesh Singh" Message-ID: <6bb1abde-3795-1917-92b1-6659ac98846d@amd.com> Date: Thu, 14 Oct 2021 17:11:22 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <20211014085851.e5xtspfcyz75lgog@sirius.home.kraxel.org> X-ClientProxiedBy: SA0PR11CA0104.namprd11.prod.outlook.com (2603:10b6:806:d1::19) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 Received: from Brijeshs-MacBook-Pro.local (165.204.78.25) by SA0PR11CA0104.namprd11.prod.outlook.com (2603:10b6:806:d1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Thu, 14 Oct 2021 22:11:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9d7961b-220e-43c8-0ffe-08d98f5f910a X-MS-TrafficTypeDiagnostic: SN6PR12MB2782: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nWYsF3OsSE7GAdoQRco2GCfsoTYOQeFBDj+fiWeKrE3SrYWlxyLiOyd/e3pOIJ2ihvJTbkGWIMDhl0TEUiQmnumqGJ9CJmfIljUPJt3Tc+3O1ISENAxLPH9EDvG2fxnt+ICURvd2wVxVg6XJUbN4LlAmq6utG8Z9QwlOtc308rAUd7gP9YV9xY9hDA7SWoOe/IWPaUd2ASow5T2mi0IymXddKPX+AhSY95Bpf24kODLB+CH8GdPa6I0GmRCkVgBgimZbasQ2umONwTYHqd17FSW+DfOZ0ZPBvl7uaxJEQOvaS/tBRJP9xVQldf40aVCdOhz8mDDireeXjX33FX7A2iZMYHWn2JdmfFiBvmGvdVl14yvLDpTr3sFkCczqfFhVNTFoJg+FVjdp2RZQQutL5XGuGb+kw8kjVD0aDi60a92fgLmKzDnE1ZYCSIzCydPzA4TlckgQA/Hlje/n9QOQ8LRVg0uyUwvUGrmzTlPQcyFqrNnHCDGDp3fnGipdorrfESgSpHHNNu9iP6XcK8fc0AE/SpdiMhb3D89Lk/XFgQeeJjc91dD8V8U7S0beD8zcfkcZvgQ/G/NPBZSaHCHq8/da5UCpGPeIQzJ9yuqiW5pjgXa7HgQsw+YZbRlYSZOIQnBuiA0FneTPm1IyRRwq6ufSIQuUXexXNGJDbwrFT3cEIwJpiM/bJSJk0EehVSmQd5hBjllb1vw951J38Bwyk7g9zgNfXbSqvaNyJH5zM/1rO78kdxE5Mtbh6zV6uNe2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2718.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(26005)(54906003)(316002)(5660300002)(2616005)(6512007)(31696002)(508600001)(38100700002)(31686004)(8936002)(44832011)(186003)(86362001)(83380400001)(6506007)(2906002)(66556008)(4744005)(4326008)(66946007)(6486002)(8676002)(66476007)(6666004)(956004)(6916009)(53546011)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MkRLdXZDV3UrQzFZZVBmZmsrUWlvK0ZnTWJWbmFxcUQ3UTVGcmJMZE0yQWE2?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910a X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 22:11:26.8975 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qvbFoAou/vXhth1GmK+nzpirSBf84Ou43U/fdaMWWnGjaDJldR1mUjueDJ0FjgiOzc7fyfZ5aH7R3p5L1LSCig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2782 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 10/14/21 1:58 AM, Gerd Hoffmann wrote: > On Wed, Oct 13, 2021 at 11:57:11AM -0500, Brijesh Singh wrote: >> When SEV-SNP is active, the CPUID and Secrets memory range contains the >> information that is used during the VM boot. The content need to be persist >> across the kexec boot. Mark the memory range as Reserved in the EFI map >> so that guest OS or firmware does not use the range as a system RAM. > Why is this needed? Isn't the complete firmware memory tagged as > reserved anyway? PlatformPei detects all the guest memory and marks it as a SYSTEM_RAM unless its an MMIO or added as reserved in e820 map file. Since the Secrets and CPUID pages are part of system RAM so we need to explicitly exclude these region. thanks