Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6123359rwb; Mon, 5 Dec 2022 08:14:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf62D2CNnnjBct20gyBMSc1cPWMBzrA7xs7ZOQWYlywONuDaOdyOpbdUpyqutF69TyhGjPwO X-Received: by 2002:a63:f90d:0:b0:477:7f9:aecd with SMTP id h13-20020a63f90d000000b0047707f9aecdmr62935005pgi.242.1670256885140; Mon, 05 Dec 2022 08:14:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670256885; cv=none; d=google.com; s=arc-20160816; b=iibgKsNVfMhZTTJMtRqhIdZ7p9amvM/tufEKSOewTjnhnqdIjqBRChqmscGJ1fvk5b tmB4664Da7NMgFeXURHS51mPAZBF7AUWP62YAWqOiUoD4F6O1WoiR5s3bMgDC8AJzhSf ithLLm90lrnTR5HlJHRfqmMsPaI9VPMLAPgiPAdQDxqPc+umcjv7NGfs1rWkCnv4GB2v BvRb1yV41jgLZlJ7Zh0gzgH43/TY/L5BR12sWTPokBkcIk14L4jyei59us7jcQlgO+dY 8FTrTUrtLzalr1NMDGij4V6F0mSTeFfgH1aIe7LX6Ofd2TWityvFfjEp0KkURGIhGiSV UKqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RDclFLuRpV1DaR1+wbzZWBt8G924zSymdLgD/1sLPGQ=; b=rWB2phKrR1gjTgM3Yca6TEGH16HmH8Q1XP1VPRDg1rphGL0IgFKF2j50HXdEhQDCIA p5YkO2YzxMSRLzpeQ7Sf5ocLWMgOBAmuzuNx/4QAvR3CjAUwbfOQRaCq1oNGSiNQ1Cu4 CHWK7qMo9yWXXiLRFzbEO++XcwTjbs/ldCAoRlchTrg0zWgZ2dd8j5aHVlMphsIgxUR+ 9w3yFtceS4uDbquPVBGp78E4PHehlq+jRLMP7TGNkDJi+g3710VcDQCa0SbMKioYnrPF l6hYyyx94E8RUCxuTwqh0S4C7degG/N0x5rsYzRd6X58Qc/VrT0XKNVv0dWg2HTCY4eb W4HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mDYiNrRp; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a17090a4f4500b0021858c46747si14647146pjl.124.2022.12.05.08.14.33; Mon, 05 Dec 2022 08:14:45 -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=@alien8.de header.s=dkim header.b=mDYiNrRp; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbiLEPq5 (ORCPT + 81 others); Mon, 5 Dec 2022 10:46:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbiLEPqy (ORCPT ); Mon, 5 Dec 2022 10:46:54 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FE697674; Mon, 5 Dec 2022 07:46:53 -0800 (PST) Received: from zn.tnic (p200300ea9733e72f329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e72f:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 25DE81EC06C0; Mon, 5 Dec 2022 16:46:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1670255212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=RDclFLuRpV1DaR1+wbzZWBt8G924zSymdLgD/1sLPGQ=; b=mDYiNrRpxM6eo58PnW9ouDXyVK0sJsicgWX2LIQe625M3zloUbAXPnMfxt2LigkmafoO7u iq30zEWp4lf15F1tTaOqTgcA0oqlVB1BgAIW27N4FY8laz9ZBPU+TO80yXIwJe0lqQO8L2 wc5sAUZMiGZwv12oFmr0n7AoqzfSbsk= Date: Mon, 5 Dec 2022 16:46:48 +0100 From: Borislav Petkov To: Tom Lendacky Cc: Nikunj A Dadhania , linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, dave.hansen@linux.intel.com, seanjc@google.com, pbonzini@redhat.com, michael.roth@amd.com, stable@kernel.org Subject: Re: [PATCH v2] x86/sev: Add SEV-SNP guest feature negotiation support Message-ID: References: <20221201100423.7117-1-nikunj@amd.com> <896d1b00-1602-2a0f-b50c-0582d5219039@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <896d1b00-1602-2a0f-b50c-0582d5219039@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 Mon, Dec 05, 2022 at 09:23:17AM -0600, Tom Lendacky wrote: > This makes it sound like these features are required to run SNP, which > they're not. It's that we can't run SNP with these features without support > in the guest. So while the patch name is long, it is accurate. Maybe, but it is a mouthful this way. And unreadable. And there's plenty of comments explaining what it is. And it is used in one place only. > Maybe SNP_FEATURES_NEED_IMPLEMENTATION if you want to shorten it a little? "need implementation" where? Host? Guest? I.e., we're relying on comments to explain what the name is, one way or the other. How about a short and sweet: if (sev_status & SNP_FEATURES_IMPL_REQ & ~SNP_FEATURES_PRESENT) along with the explanation in a comment above it. Comment which is a must regardless. Hmm. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette