Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp393652pxj; Wed, 16 Jun 2021 05:04:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWzrlLjfNF66fKyJUyzRvZnpzgrT34OLZUX/Tq1tgRJHdO4r7xMDKEN/zzy9Fn2Zkhp2Xt X-Received: by 2002:a05:6402:26ce:: with SMTP id x14mr3792375edd.104.1623845068522; Wed, 16 Jun 2021 05:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623845068; cv=none; d=google.com; s=arc-20160816; b=smlkltyKKtqFBT81Yu2EixI/JT/53HRleizh0LsSlad+OCy/68i44C5MQFIOW2+fvp +gSoQftb8HXiXzmFWQENYUtjy3b7fV/A2ajOlwWXwaiyQbSP9f6SAmvafms6VYndowuP /p72W1XVCPkO8QPUmVNBAP14HsyZUNG95Khyg2OXd8cImuGzxq2fbO8aBxkYKaCXMal1 F0JFDz6igwkDlVEyZCgkKVBLM5Iyt76hPCqje99EK/ysrXXDTz72CL+6uyLeJpWR0gk4 o2QlDJVg7qTu5by++fK6wdBx4FhpE/uEtqkslGOipy9UJ0bU2gYm8kDbOIg9i3RcA0b0 buGA== 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=qK3Y1DHOt57Qig7xfqZFQT3ydoFk9JaEiyImUpf/4h4=; b=V2GDPSsc2PmcUfBKzsp5uPzGCq6faPb6NiryHYQAC+FlD3pB6t8/QPxJjNUB4fHG4d wLh+KsuiqC8n+xeMLJeB1qa7Q+KrKYk0zU7gUIUjLJVjgwyzBHJiEcWcEfbp3bKmoMHo KqnA2aKTQzpDn/slxm+/i6UBrzygjC3eOJ/+keIX3oIn9Q/s4Rgq8Ji/xOzjDECY87pD Ys3Qbhx0tb8+l9/CuAQ1H1EDSSbspPzBfH+IIuArYEsbmqdLBXDfN2VrQ0G+JVtTZlPP VhHa7JhTYB5c38+G0v3OAoQeRP5WPlcOBnxMdbbOF8djrOdOzQueDd8/FIE+G/vz7bY/ g5zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mPkX1Wjd; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si2042889ejl.150.2021.06.16.05.03.48; Wed, 16 Jun 2021 05:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mPkX1Wjd; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S232543AbhFPMFa (ORCPT + 99 others); Wed, 16 Jun 2021 08:05:30 -0400 Received: from mail.skyhub.de ([5.9.137.197]:56520 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232164AbhFPMFY (ORCPT ); Wed, 16 Jun 2021 08:05:24 -0400 Received: from zn.tnic (p200300ec2f0c2b00ec25a986a17212ee.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:2b00:ec25:a986:a172:12ee]) (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 3BAEE1EC03E4; Wed, 16 Jun 2021 14:03:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1623844996; 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=qK3Y1DHOt57Qig7xfqZFQT3ydoFk9JaEiyImUpf/4h4=; b=mPkX1WjdJx43H98yJ0xojjxpLkY44F46gfmAvHgRhvQxPBJMGtuYOk9hA3L8aJwckyEYjZ 5rQCCG8gEnwy45fVBV3wv3aILo7Xjvo6F5qham5jpiWltLR6fF3pok4WGqWjxdq/L0DgZ2 ArwOn584uWA7wywbnefvHhDirxUBCUM= Date: Wed, 16 Jun 2021 14:03:05 +0200 From: Borislav Petkov To: Brijesh Singh 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, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , tony.luck@intel.com, npmccallum@redhat.com Subject: Re: [PATCH Part1 RFC v3 11/22] x86/sev: Add helper for validating pages in early enc attribute changes Message-ID: References: <20210602140416.23573-1-brijesh.singh@amd.com> <20210602140416.23573-12-brijesh.singh@amd.com> <70db789d-b1aa-c355-2d16-51ace4666b3f@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jun 16, 2021 at 06:00:09AM -0500, Brijesh Singh wrote: > I am trying to be consistent with previous VMGEXIT implementations. If > the command itself failed then use the command specific error code to > tell hypervisor why we terminated but if the hypervisor violated the > GHCB specification then use the "general request termination". I feel like we're running in circles here: I ask about debuggability and telling the user what exactly failed and you're giving me some explanation about what the error codes mean. I can see what they mean. So let me try again: Imagine you're a guest owner and you haven't written the SNP code and you don't know how it works. You start a guest in the public cloud and it fails because the hypervisor violates the GHCB protocol and all that guest prints before it dies is "general request termination" How are you - the guest owner - going to find out what exactly happened? Call support? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette