From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.51]) by mx.groups.io with SMTP id smtpd.web09.6500.1632480421596194274 for ; Fri, 24 Sep 2021 03:47:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=laDmz2pb; 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.243.51, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iOzdBFV5v+TYtL4yYSpzYUxPp7x+Ao2w3AgXAsXP/f79dhr0R/bYSNBnw30TtSHhDQh7BzMd2CtR3spFqIF2bfMdThFT2mThI7IyFwqzm+752D/MThl/9+tQu5n93Nkg+Rb/izRWU673wyPfa2KB00XK8LDcx70zVR4AgTfwtgg84HY84MELlZqJ8Tn51zSjJkEV0thz7dge2Ju3ydkS5R3ShXDqS++eHwjAzgbYcfuwXN/qv8VOoNdUv0lr1TRH/C9C27VhKBShiVC7viBnvcND/VCaTfSX388EcWuJCnniHhghMR0jkZMn6TIpS0OjQf0LC/UPNYrZ9SVLh3ruWw== 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; bh=u0TBBf25ORYHR4uN7u7tZcIoElsr0kP9GfA00CvJe7Y=; b=AGkPUGRK2gWvq7Z2bwKC/jA0Lcs/ok9W4mw66YuF0LkRvCaj8tD/dNPDkADPXuNh6DNesYgDuya1YS6QlUMTlrghJVQslMFBxdR3GHFEJcsKHPHOA+c5BAMksIKutxfxtj+LsKjzMB1qOb5IYso9s6caJnN2c5+yeRkKX9s10GTtjhaTZiIOqg8TXfb34tI+zWYOPgfR5yeof6GjlKzFeX2pOeOVdktNF3HDVqmOdXJeoNsqy+X/QuEXb9mUt4WKG4gW7RTuW+v3Pil2cD2Hrg6YqRi3n4jYfeZ/oWFWENmsvclQACj2YturoHGthQOcDbR5YNuWe22/KSJafI8chQ== 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=u0TBBf25ORYHR4uN7u7tZcIoElsr0kP9GfA00CvJe7Y=; b=laDmz2pbIdcbNI2+F+jvmbJjWzJEwnQz2N6OqIFcgE76iiU+ujImn6tvubi6JnxX+UbGI/NY+m/Rj22vYNTcBTBqsXdg99zdHAdqJaIFEOfjzFeUVQ7IipSTaHYwKsQjBtjo7cS825q3y7JtSWnW/FNCQmdtvowcjieqiC5k1qw= 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 (52.135.103.22) by SN6PR12MB4669.namprd12.prod.outlook.com (52.132.115.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Fri, 24 Sep 2021 10:46:58 +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.4523.022; Fri, 24 Sep 2021 10:46:58 +0000 Subject: Re: [PATCH v8 09/32] OvmfPkg/MemEncryptSevLib: add MemEncryptSevSnpEnabled() To: Gerd Hoffmann Cc: devel@edk2.groups.io, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth References: <20210920184604.31590-1-brijesh.singh@amd.com> <20210920184604.31590-10-brijesh.singh@amd.com> <20210922080037.aujjbpbltjf47ygw@sirius.home.kraxel.org> From: "Brijesh Singh" Message-ID: Date: Fri, 24 Sep 2021 05:46:55 -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: <20210922080037.aujjbpbltjf47ygw@sirius.home.kraxel.org> X-ClientProxiedBy: SN6PR2101CA0005.namprd21.prod.outlook.com (2603:10b6:805:106::15) 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 (70.112.153.56) by SN6PR2101CA0005.namprd21.prod.outlook.com (2603:10b6:805:106::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.4 via Frontend Transport; Fri, 24 Sep 2021 10:46:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75b2dd99-338f-47a9-d02d-08d97f48a1cc X-MS-TrafficTypeDiagnostic: SN6PR12MB4669: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mUmMbGplogDuE/UvQNXDC8NR53VfnnFrq7IBnZqpnyGBNI7JAlGl/BxOc346MTgg0mIbBtApKzX7Ll1XgIIr7vwHBwwoN6JxiKlfz5xu46fPpaP7YKrKDVhYssGoTuDKV6cspVc1t/8sanySQoCZIKoLMgQbVb9URJEaOyYFaqSSFLP9KtHHr+YiOdqc1uX3MbYBYHgyC1C8eBzdwHs0YAKw2LVbivZJj7P3iecaStvSd9B4jMzgeZsFf70NJ1j9x3hLDXqsHedWH3QqtEV6qLQQ34fWaGR7J13PDrgQeRHB4tebiyxWhQz1kgE97DsjGuwxCtlov1qlPQKqB/1HFs4MWF0OqEb4o9m+ATyJoGDzkMcuEceXhK8N1FRzWTnKnDqjLUM8wVVWgMJrQN+favqpr0e8YGc+wI6P7JvdeBnu94RFuggDdybHhIHiKcR7Ax0vVRKwB54TrK9pYC1wfrhZ+DfUCyDIaCBMuxJsLtvlf/L/3EW1l2cxOoVtFOkRx4/2M4Pm+1kxCRvHnBT44uVkMrJrB6W6mJthYNj7v+DHN85HpCVtOgvdc0FP7tRb/yjIsmjxiWSAz+RI5FHSXMQ9TQezS6FBUCyU8b5epKrOXLqTzz1vGH+0hRg/t2/2mYxmCzyr+pzj9Q/qcx+hhpI84piRC4oHRXhBoIsSJ7rr9YnVu2qjkYBDUiEMvHVmt/E0nlfcisXQyFPNId9/cBDEway0pxuXBy3mlbRFDrfPs8sU6UVgPrTDGpYf9gl6uq3lGHnnaYP1HYaq7iQpq9IDRZRjzYoi+XaA2DfSXDo= 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)(5660300002)(54906003)(4326008)(66476007)(8936002)(2906002)(4744005)(44832011)(31686004)(83380400001)(6486002)(66556008)(316002)(8676002)(6512007)(66946007)(186003)(38100700002)(86362001)(6506007)(38350700002)(53546011)(26005)(36756003)(956004)(2616005)(6916009)(508600001)(31696002)(52116002)(213903007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L0JVVjErUDc1YzUrV3FpRjdFV0R5MHZJWjljOXEyY3IxbkViellCaXBicys0?= =?utf-8?B?WmhaZmNVZlU0K2lKL3ZqL3N0WXkyN2NxZFVLUE1hOXJBcytJbW1PSlVBZWxS?= =?utf-8?B?RmJUU25mZnR2RHhaR3I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KT011aHYxS3E2UEU3T2VDWDdlcnZWRnlGM3dGNmJabUUzRVBaRUZo?= =?utf-8?B?OTNYaEpBTjJQazBoa3B4RHJGYk5wZlBzcHB6Yk95U2FxempHbHl5QnErbDdQ?= =?utf-8?B?WlhkOVB5QmFRemdDM3ZJdkV3aEZQTHczdi9oS1RFS3dHRElMS1hkT3hvVHgw?= =?utf-8?B?Z0VnNXZZV1JxQmJ1azJ2UEhKdlpWcFFHUWxrK2VtT2xJYUhMUXlMMTg3cll5?= =?utf-8?B?TWpaZ0ZDWTVhRXlrQU5WRXN3Y0UvMTFjQ1VGcVczQ3Zyd2hvZkZiNnBjSDVJ?= =?utf-8?B?TEE4dndXUUVJVEN0WVZldlk1VlVaWHhabTdwcWhhL1hSQ2pIekoybTQ3ZUtU?= =?utf-8?B?VlpVMERULzVBQzNrckYvQmJ2R0djQkJnUGVFUVZ2UEZyeDRubGFiSkdDcE1q?= =?utf-8?B?TExpSzNhdmhhVDQvekhYS0xtTDhiTzUxZmJXcnIwRkpER2s5Z3V3MzU4dXN5?= =?utf-8?B?T2FOUG9Uc2czQk5id05BQUVhMUswVytGa3Nob0hTVkl5S0MySDM0eXkvV1dX?= =?utf-8?B?US9wSHRoN0tvTXRHTnl5RDRKL1paTkYzKzBXM2s2eG1tSlRGeWlKQU9MMlZD?= =?utf-8?B?YmNoMldOM1lBTGhlMDY1Wm1QQmxqRlh3MlhDMW91ZGFONDVwUWRHSXVUcjdL?= =?utf-8?B?RHRZRng1RzFKT2hOaHFtcGhIcjlTeTR6NWpqQXRoZytDdTZjQ2piTXRVUmlI?= =?utf-8?Q?x4I/2e+SSDxvunRFXd2QG58Cp0nvntthBeft6bi?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75b2dd99-338f-47a9-d02d-08d97f48a1cc X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2021 10:46:57.9602 (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: pubcXojhmSAHVn6TfA7tmpF1AihmVbWirtLcxelyGwEE1+BdjShneON4G2bsN6cKwt35gTxgkkgJYRGiAu3I3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB4669 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 9/22/21 3:00 AM, Gerd Hoffmann wrote: > Hi, > >> STATIC BOOLEAN mSevStatus = FALSE; >> STATIC BOOLEAN mSevEsStatus = FALSE; >> +STATIC BOOLEAN mSevSnpStatus = FALSE; >> STATIC BOOLEAN mSevStatusChecked = FALSE; > Better use the new PcdConfidentialComputingAttr instead? > At least in Dxe Phase, maybe Pei too (not sure what the initialization > order is)? Let me see where I can use the new Pcd. We need to check the Sev status in SEC and before the dynamic PCD is set so in those case its still required but once PCD is set then we can switch to using it. > > take care, > Gerd >