Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp379737rwb; Thu, 12 Jan 2023 21:51:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXuh1M/GGlhpjEcxkW+OQf6Wj6l4Utvn/B42PXt6rZ4G9eYu79Gw+B81snsyCH+/h5svMi22 X-Received: by 2002:a17:906:171b:b0:7e8:ced8:cb9b with SMTP id c27-20020a170906171b00b007e8ced8cb9bmr65540812eje.42.1673589099794; Thu, 12 Jan 2023 21:51:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673589099; cv=pass; d=google.com; s=arc-20160816; b=aEeP6X5KUTjmT5rHmql+9WX55ZdPlHuEtbKq8qEx+cVFKP07xMA0Br85F+kmkzwLeB qIFkO809GoJXUl86yJDxy2t1P3B4OlFi8AwAk0a+YHKM6NC3W/hKZ/M9UUhcMvSEMBlV 3q28cBoGzCeY2VXdOaNR4PWPY5SLgPZZhS7vLXBzrduRBgmQuzxLvm/nmAEbLL+Ax862 fOZvCgn+XYddBZ5xQ0TZPHoNNqMMD09UZIqTCwtXGf8Q0cu9JNIVpOGPejLNnGe1//1H OjumjJdZ3dDd2M3r397+XmwLlxRMacawltW1WoYt+iFz5WuUf+rb5RQTO3XQLFZIYAYe ZBHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=LdIDLJXk9V4ymMeIUFPDy1hLr4RddNVB4QAstKy5GTQ=; b=bJxALBWvN6ZHXAyCJX4yjygEkqjKkyFlE2GyKzs8KG0qWwYHrs6CER5GodqzCgJH6k oH6kfbKCbSUcdDs0y0DUUsX9dlZUmeRQ2uurUcbWBySBE09bDOSceN8VMXO7Br0rwSbI ZI1h1m4pZ2n2nTw/xuoRpKffRzTxeIoh9//Ag+KjrugARwQI1i+Qb5E0nfpfqtMNoki+ muDHDiseuEs54/CLHk4Wrp9tRL+HB0/OuuxtYvMnbv5oeoKzNk8Qy19vVx5ea4C91u6V Y4YY/aZ3J3Wdw7UXc95dbRtpNvMlCKkgGxOih+A5byVmvrgHn2FmOq5iaUzVIo51nDsK /nJw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="E6uz2N/q"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc44-20020a17090716ac00b008566fec3fb8si12071726ejc.392.2023.01.12.21.51.27; Thu, 12 Jan 2023 21:51:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="E6uz2N/q"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232897AbjAMFbY (ORCPT + 50 others); Fri, 13 Jan 2023 00:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233217AbjAMFab (ORCPT ); Fri, 13 Jan 2023 00:30:31 -0500 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2053.outbound.protection.outlook.com [40.107.102.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C2686130D; Thu, 12 Jan 2023 21:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DiThprUJtWEt/tVyEizNqGlIOSPl+MYVzg32CH6/Fu1xt98eQ6ZQWDd3nS10UY8Dr7gExNPC4+c8eo7J1FxojzlQyt7zM5WqPkOelxDzgucKsJ+wGmXwrcNXjjnB0ms8S/XdWPQq5dU7NRV1ZkUUjek1znyAIleMOX7b3f17peb/kumZCA5C9yyGYHS+ndhBfXULM9ie4WOUVDKC64sJV6lU9X0kgfLU6miW3IzV7ThshQYJg85KU5WwSb1zyX4I8u6sUExfmqBhmBSEK1/S+wRRcJbxDjFDroiZMBHFb8wnq9Tu81hAHGohJorrS9zzLjVZ5bsEUf4cv8GQ9SsFaA== 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=LdIDLJXk9V4ymMeIUFPDy1hLr4RddNVB4QAstKy5GTQ=; b=Y/i+PZ5E4kCoRyhmuDHpiTk5HPbNnFBH1+VNFMIRgDyI20KxxQzVdV5ybVLyQZaaQc/5N8uv9F3jHEoLu28d0ZF5tTXHcou4zVNBrbuoMC6lkzCaatqxz1Xp2rLbTim4ogrCZe7yzNO3+Mj6ljMwpQ7e+qktUQwWJGfWZjuZngw2UGNpXP8aCVx9aAMswBmUvvSijNwqJTa5gJNMBvYIrTAs8Vg4yUSBBI0H5aS5cBaL5FUlm7+Xb/VADbPSJUgz5yZSg4KVNFahRKd/wwnwYMYHadEUhmnAqu9ZRGcker14EdfUgKo5vlhE0PY6Z72t+a8LUlfbAiXky1krpT1uhg== 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=LdIDLJXk9V4ymMeIUFPDy1hLr4RddNVB4QAstKy5GTQ=; b=E6uz2N/qzPImN72ddcFGDX+9VJh4TF8dVbWkWG7zK2gEPFr4ahjAJl87SOR38U6EShZ5FZJak4IA3atT7a1JUhmwdKdHz60p8U4iI2hKDr+ydPnT07LG1ACvs/YaofidMIYal6C9f0UJcr33haiJlssaxAmsGYYjZ1DL4ECuoA4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6309.namprd12.prod.outlook.com (2603:10b6:8:96::19) by DM4PR12MB5183.namprd12.prod.outlook.com (2603:10b6:5:396::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Fri, 13 Jan 2023 05:29:15 +0000 Received: from DS7PR12MB6309.namprd12.prod.outlook.com ([fe80::8079:86db:f2e5:7700]) by DS7PR12MB6309.namprd12.prod.outlook.com ([fe80::8079:86db:f2e5:7700%6]) with mapi id 15.20.5986.018; Fri, 13 Jan 2023 05:29:15 +0000 Message-ID: Date: Fri, 13 Jan 2023 10:59:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v5] x86/sev: Add SEV-SNP guest feature negotiation support To: Tom Lendacky , linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, bp@alien8.de Cc: mingo@redhat.com, tglx@linutronix.de, dave.hansen@linux.intel.com, seanjc@google.com, pbonzini@redhat.com, michael.roth@amd.com, David Rientjes , stable@kernel.org References: <20230112084139.12615-1-nikunj@amd.com> <4cf6a6aa-81f9-4fae-2a39-1825433f9ee4@amd.com> Content-Language: en-US From: "Nikunj A. Dadhania" In-Reply-To: <4cf6a6aa-81f9-4fae-2a39-1825433f9ee4@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PN2PR01CA0099.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:27::14) To DS7PR12MB6309.namprd12.prod.outlook.com (2603:10b6:8:96::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6309:EE_|DM4PR12MB5183:EE_ X-MS-Office365-Filtering-Correlation-Id: e5c67a55-fe5e-44e4-7d8e-08daf5271bbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IXl7ngI3C7SvtfUlncT+55atOKBh5u7Jw6n2PD2+ML5y4FC/P9qxIdmFbEZuDPHwZR9aJuKQr6Rc5N6WVz5G9ZdYDu5pbCVjvdSAiXumEdCzyUf0eSDZJOBiu0TFqdZ2GVsTOa5X9RKn/ivBt6gjAUhFdzxmqFyK7FD1YNZ7gA68aLMYrE4JbT9M2eBeDEIhuqf0Rau6XR07kTcMouq1mz3uGkuYhihQXxOa15RhLzOYqFDuCxXhJiNne87RHenrkXH1tZGCbd5pzk5IGN0ambD8bclMKeherbJBfiGyZ/COjlOKp7BaUavFoi4bROLVIG0Y7O1ghlDT8BrtB6cYWnyAHM3shdsQHMHwr9bIa74IPkkYhZEUDC05azaMRJMXvHh+xOG5dCFaWtVEKLebGjiT49c4oRxxQuWfuh1ZM/koSzkwZQZE8vGBFsbFDhHSy1dMY+dZIPSgLMq/DLzTKGC+InghYqRjf7V14aPyQG7MnBsUXUnoSMXVZewxngc2bam1JU63MxEDI/224lNvHVgxo3ZK00o5AdTDsO+ej4Kosv8Vygk4YKnsmjZ39KGeT25gtmmBDf5dLEAGRyDZLzAplG6A01OqGJAZqprbOWPtZRSiGz5pUk/u1Aql9Dboys2EC/L5gdBHEuhTcrpfsPpAnTPvAHo1wxFndR2Q94mBjTaSmEb3NAz+nz1wb7Tf82W+H1P4vTjHpi+prNkqKbYGF81I5AQiTX4n1pYdj3M= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6309.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(366004)(396003)(39860400002)(346002)(136003)(451199015)(31696002)(41300700001)(36756003)(5660300002)(6512007)(7416002)(8936002)(4744005)(53546011)(26005)(186003)(66946007)(478600001)(6486002)(6506007)(2616005)(6666004)(83380400001)(316002)(4326008)(8676002)(66476007)(66556008)(38100700002)(2906002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SVowMEFLWEk0aGdHSzEzSTlNakllcjVDNGdjSUw1NHVHaVZiSVdCMCtodDNr?= =?utf-8?B?ZEFHcGI0RWlXRVRMY3dWUnpKTmtURWh4YmhkeWVPS2dKRXpoV1VPQUpsdTdN?= =?utf-8?B?aEEvNWFzYmRac1JKNzFSNWRhZzNjS0p6UWlMTEtHdkt5R3p4aS84NFljNjQ4?= =?utf-8?B?WWlNZTQyNnBhQ0FYOWdwYWVVenN3Mmo1aWhmZ0lZQlhydlZjcEIrcE42Z2cz?= =?utf-8?B?YzZpUHB0dG5YOHJWNEJ3UlZFQStPcnZFV28yMVRrWkUveDg2SERXMWxRUXI4?= =?utf-8?B?STJNZVZZOE5La0NWWGxESENvWXFXbkpDZ29ydmlvU1NZVElvTHpGV2dzbURy?= =?utf-8?B?blNGUmw3L0ZUcVlxZ2licFFuTVo1amhjSE12KzU4TDB0czlOdVhPL01KRmpj?= =?utf-8?B?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ossTenant-AuthSource: DS7PR12MB6309.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2023 05:29:14.8679 (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: 5aCZepI8c5TjUv3qCTxeJJJNAxi58zoihUho6LCmOHIKTH6jRTgnIq5RJnYTyCmSw0JkKgkm2IHtkHu+FuKDcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5183 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/01/23 20:12, Tom Lendacky wrote: > On 1/12/23 02:41, Nikunj A Dadhania wrote: >> + >> +        if (sev_es_get_ghcb_version() < 2 || > > I would just use ghcb_version directly here. Right, that will work. > But if you really want a function, that should be a pre-patch that also updates the other areas that directly use ghcb_version. There is only one such reference other than this one, will use ghcb_version directly. Regards Nikunj