Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11003811rwl; Mon, 2 Jan 2023 12:00:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWomlpnc3y/VsTTDw7EQ3OOY/FFebXEfyp9a1KA/v2Z1+6yww7haPrLKZB4eiKNxqWEzgs X-Received: by 2002:a17:906:281b:b0:7c1:5863:f8c4 with SMTP id r27-20020a170906281b00b007c15863f8c4mr34921039ejc.21.1672689633366; Mon, 02 Jan 2023 12:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672689633; cv=none; d=google.com; s=arc-20160816; b=hNUUi7c92agY/8g3huFKVmrdoKN6O24lxq++8MOU6PXfz4dG2R5P1xusLoXKA9dDS2 ZtUkYdnxEIhJNH8HTWYGYXA6wvel0I6DEDUmmUrHFiQ2LGklGEUhY332YfbEijwlZpEF d1spWK8XThrZ5WYNl31Ltn9zC0u4hesPAnQjv6qGlDH0rrBeiF6k3cVIhghBPbCQgJdJ Lk6VYAlQz9b9/iQNxsmtj9R2dk7aG6jdBri7JrZyQGf0ZbtW/c7dO8LSqyu8hycDH3V9 lDnnbZ5VQ/706Qs0KNEBkEFu4xYt+gj9KWS4RkkSlbAWQcOjwEJA4/SU6R9M2CJ3PF/B N4Qw== 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=+L+JdAD5fujGBQBI4oqQqpeb1zLWSL4pvB3LgNSB0fs=; b=UJ4HED59iaiFEcMe99QUQE0X1kcuHDVtURftJ/wVRfDqRpEci+AS1NPZKXlutPJdNX 2rat3bR2vuGydNg+LRYJUFRem7z6e8apCmoWSuy4BSf7PsebeGK4dHKLc4OejpvBCbwH pAFanP7U6CLYpe7xKvCi+7/77YJzCwtcryZ7mrsnqYba3UEmtEkgQw5j1LPwJCnP+WHv JPJxIRULdUmd66rzYBqeNysc/I5+Kjp6d5+ND+5w5jVwbICJnJ+vs/iWw2GKr+L3znUk vxn4xOZQUCH29TkB2TiZxte65/mrreceUpdni5nL6Gc2/awWpW3NRvg+Jaseil4Z3S+H FUZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=W5YbOv7U; 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 t18-20020a1709063e5200b007c177f0064dsi20563445eji.972.2023.01.02.12.00.18; Mon, 02 Jan 2023 12:00:33 -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=W5YbOv7U; 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 S232366AbjABTmW (ORCPT + 62 others); Mon, 2 Jan 2023 14:42:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbjABTmU (ORCPT ); Mon, 2 Jan 2023 14:42:20 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E852B482; Mon, 2 Jan 2023 11:42:18 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 A74C51EC050D; Mon, 2 Jan 2023 20:42:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672688536; 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=+L+JdAD5fujGBQBI4oqQqpeb1zLWSL4pvB3LgNSB0fs=; b=W5YbOv7UBgUHPOdMItwgm1S76PCy+0cPBg6pySgudrO2FeQRmqaIJlpTGuYQTUkXCNfT2W GF20fbR/hMR6eRkchgSB1X/UNifSX6gsOc8lhqnPHInrA8CF8H2PDkaR1+qL/Jo+d2nacK GbKA3QaraMdmtS5wg5OSmhmRMtpTBA8= Date: Mon, 2 Jan 2023 20:42:11 +0100 From: Borislav Petkov To: "Nikunj A. Dadhania" Cc: David Rientjes , 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, thomas.lendacky@amd.com, michael.roth@amd.com, stable@kernel.org Subject: Re: [PATCH v3] x86/sev: Add SEV-SNP guest feature negotiation support Message-ID: References: <20230102083810.71178-1-nikunj@amd.com> <3169b54b-d990-7707-5ec4-cde7261318fe@google.com> <45487a87-764a-7ff3-292b-4a55fe29f7ba@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <45487a87-764a-7ff3-292b-4a55fe29f7ba@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, Jan 02, 2023 at 08:50:23PM +0530, Nikunj A. Dadhania wrote: > I think the "why" part depends on the user. Whether or not the user needs a > certain feature enabled for the confidential guest. > > If the cloud provider(hypervisor) enables the feature on user request, the > guest terminates with GHCB_SNP_FEAT_NOT_IMPLEMENTED when guest kernel does > have corresponding code/implementation. I think you mean "does not have" here. In any case, I think this whole handling of SEV features could go both ways: * Cloud provider could say: we've enabled features X, Y and Z and if the guest doesn't have support for them, then it would fail booting. There would optimally be some text sowewhere in the cloud provider documentation stating why those features are enabled and thus required to be supported by the guest. * Guest owner could require a minimal subset of features which must be present in the HV in order to even boot on that HV. Of course, I'm only speculating here. How it ends up really playing out in reality we will have to see... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette