Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp680742pxb; Mon, 7 Feb 2022 23:12:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvA+voPnDlzd58rvwmgyar88MBaf0eZE7QOsA2yhMdWXvY7buTczyrXl5ZOKf/GkJtk4xb X-Received: by 2002:a17:902:ba98:: with SMTP id k24mr3155988pls.44.1644304335051; Mon, 07 Feb 2022 23:12:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644304335; cv=none; d=google.com; s=arc-20160816; b=jkui5JC0NbblezH9oQ8QWWi/1nsTrJt7sRzbGMkCI+WUtnj9x30fXU7/0ZDIXhkrlB QqnSp8kJkySrBuvQgUYgaldol3Iu4manHa+m1ylZx1f1LhIAdMG/MDSamJZiYcURBK2h WIzWVatflKjQTVqSxC3yah5hbkoSycU/uud09tvoBEiuQr08VeHPwWdLJ9x4HgKj5gxv IyxIvXN3LZXQ7wlCaBzV35kv21OiWQQoPEisWmokVy++ArEFfL8EHgBB0fSU7dl1JQ5T i5WHJ9O5nGNd0oEAgbOWKp3EFfuT8uxejft1fMCx4bECVxUMp6si1+LOTCMll4kW3ZD5 wNdQ== 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=SZEc3K4WUssJFPuRZM4cYUdq0EX2pDa+Q3YePuI1VGc=; b=SAGg8pmbWpsaH6/frJuDmA+M6AMP/A1HrC/MxHB+RGvDFESGinJe3jLQsgSLR1PKDI TG2JGZUO0TTgQV+CfDQY5cCj4hld04XPhIN2zOJX2WYT/yng17SMRkLBVaVhjf0+v1uW ZL26DdCYDCBqUO3XDzxe5Hr1mFR33NuWnKMDuGEFBuQWVJOQ0dSqNxcmeod5DglnqrDy xx6lURYP/eJtBQs/ykxg/LPTj/ypRzappmvkDOhrnL0Rir0o2wt6AQ+j1QNEwPGj16em noUO0P4J78C8a4FkhkOD8MzZsv1b9tADnsZnQMSdpAGX2A4O1XRIf8otL3fMV17cAPcO nsSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qmClInz1; 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 f2si12623195pfe.346.2022.02.07.23.12.01; Mon, 07 Feb 2022 23:12:15 -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=qmClInz1; 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 S232553AbiBGSrJ (ORCPT + 99 others); Mon, 7 Feb 2022 13:47:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232506AbiBGSnO (ORCPT ); Mon, 7 Feb 2022 13:43:14 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1835AC0401DC; Mon, 7 Feb 2022 10:43:13 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 24AE01EC02B9; Mon, 7 Feb 2022 19:43:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644259387; 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=SZEc3K4WUssJFPuRZM4cYUdq0EX2pDa+Q3YePuI1VGc=; b=qmClInz1dKwfOZbiO2QrY2gZK/xZolImE900/WaPmxRFwwOa2cp3K4OMeOEJsTi80Hu4Qp G43sMx+xX8AUxdLvcgTvewjlRnNRSbTkdwsgOZ6e9vtHFY+GtTdk9DIq09oCjIgK1EE+5Z CRyqtdz0t/QXSU+RToQpc+wZ3krqc2c= Date: Mon, 7 Feb 2022 19:43:01 +0100 From: Borislav Petkov To: Michael Roth Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , brijesh.singh@amd.com, Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v9 38/43] x86/sev: Use firmware-validated CPUID for SEV-SNP guests Message-ID: References: <20220128171804.569796-1-brijesh.singh@amd.com> <20220128171804.569796-39-brijesh.singh@amd.com> <20220205171901.kt47bahdmh64b45x@amd.com> <20220207170018.sg37idc6nzlzgj6p@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220207170018.sg37idc6nzlzgj6p@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, T_SCC_BODY_TEXT_LINE 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, Feb 07, 2022 at 11:00:18AM -0600, Michael Roth wrote: > this is more a statement that an out-of-spec hypervisor should not > expect that their guests will continue working in future firmware > versions, and what's being determined here is whether to break > those out-of-spec hypervisor now, or later when/if we actually > make use of the fields in the guest code, I think you're missing a very important aspect here called reality. Let's say that HV is a huge cloud vendor who means a lot of $ and a huge use case for SEV tech. And let's say that same HV is doing those incompatible things. Now imagine you break it with the spec change. But they already have a gazillion of deployments on real hw which they can't simply update just like that. Hell, cloud vendors are even trying to dictate how CPU vendors should do microcode updates on a live system, without rebooting, and we're talking about some wimpy fields in some table. Now imagine your business unit calls your engineering and says, you need to fix this because a very persuasive chunk of money. What you most likely will end up with is an ugly ugly workaround after a lot of managers screaming at each other and you won't even think about breaking that HV. Now imagine you've designed it the right and unambiguous way from the getgo. You wake up and realize, it was all just a bad dream... > Ok, I'll follow up with the firmware team on this. But just to be clear, > what they're suggesting is that the firmware could enforce the MBZ checks > on the CPUID page, so out-of-spec hypervisors will fail immediately, > rather than in some future version of the spec/cpuid page, and guests > can continue ignoring them in the meantime. Yes, exactly. Fail immediately. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette