From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEDFEC2B9F4 for ; Mon, 14 Jun 2021 19:03:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 04B0D61378 for ; Mon, 14 Jun 2021 19:03:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04B0D61378 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 48A2F6B006C; Mon, 14 Jun 2021 15:03:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43A3E6B006E; Mon, 14 Jun 2021 15:03:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2664D6B0070; Mon, 14 Jun 2021 15:03:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id E562C6B006C for ; Mon, 14 Jun 2021 15:03:20 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 70A3A181AEF21 for ; Mon, 14 Jun 2021 19:03:20 +0000 (UTC) X-FDA: 78253252560.38.7363F08 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf30.hostedemail.com (Postfix) with ESMTP id 4C1F6E000272 for ; Mon, 14 Jun 2021 19:03:07 +0000 (UTC) Received: from zn.tnic (p200300ec2f09b9000b7fffe760596043.dip0.t-ipconnect.de [IPv6:2003:ec:2f09:b900:b7f:ffe7:6059:6043]) (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 A45541EC036C; Mon, 14 Jun 2021 21:03:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1623697390; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/3kMPVen/9z57u2UbxMExDvEmMgUhoVDDFZvPh6gxAo=; b=XuoyLLRbZevtMCxqnibgVla732fFMZoVlK33TxMxxQUlxz3GPgAFbXE3jlB7UUUjg6h99/ IW7ku0XcDx5s+rQByrGWw/+wnwKTUcUOpIc/hNQClxs8DtchLYYBiXCS9e+kBMK2z47Q4/ 1uleZYgfef/L0DIl2EU1wsc7OXHxoMw= Date: Mon, 14 Jun 2021 21:03:03 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 4C1F6E000272 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=alien8.de header.s=dkim header.b=XuoyLLRb; spf=pass (imf30.hostedemail.com: domain of bp@alien8.de designates 5.9.137.197 as permitted sender) smtp.mailfrom=bp@alien8.de; dmarc=temperror reason="server fail" header.from=alien8.de (policy=temperror) X-Stat-Signature: q4yxj4k3951p396wqm7huf7t5fsxh9n4 X-HE-Tag: 1623697387-261078 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 14, 2021 at 07:45:11AM -0500, Brijesh Singh wrote: > IMO, there is no need to add a warning. This case should happen if its > either a hypervisor bug or hypervisor does not follow the GHCB > specification. I followed the SEV-ES vmgexit handling=C2=A0 and it does= not > warn if the hypervisor returns a wrong response code. We simply > terminate the guest. This brings my regular user-friendliness question: will the guest user know what happened or will the guest simply disappear/freeze without any hint as to what has happened so that a post-mortem analysis would turn out hard to decipher? > I did thought about reusing the VMGEXIT defined macro > SNP_PAGE_STATE_{PRIVATE, SHARED} but I was not sure if you will be okay > with that. Yeah, I think that makes stuff simpler. Unless there's something speaking against it which we both are not thinking of right now. > Additionally now both the function name and macro name will > include the "SNP". The call will look like this: >=20 > snp_prep_memory(paddr, SNP_PAGE_STATE_PRIVATE) Yap, looks ok to me. Thx. --=20 Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette