From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15E7D2FB8 for ; Mon, 14 Jun 2021 19:03:12 +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> X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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  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: > > snp_prep_memory(paddr, SNP_PAGE_STATE_PRIVATE) Yap, looks ok to me. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette