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 780933FC1 for ; Fri, 27 Aug 2021 20:16:53 +0000 (UTC) Received: from zn.tnic (p200300ec2f1117002bace1eb09205059.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:1700:2bac:e1eb:920:5059]) (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 514951EC0453; Fri, 27 Aug 2021 22:16:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1630095407; 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=hCYoAQ41iPdcZpGqXz/s23YuGJNo/dQNa8YAMDCU2HY=; b=GjwdFy7qt3ob/0LSLGK1B82Uz9msxITNAaImGC4UJMX+n4gSh2vCqtUX2rj8qMmiRPn1e/ HecOiNXJt9D+5vT+0p8cH27z9/RkZ1Q/Mk6D1oG4FD+3yJhzjZLXLE3tSuH6RdA+IAQFfr Thjs6tnmfK016mHtHDygxa8FbMhAwFg= Date: Fri, 27 Aug 2021 22:17:25 +0200 From: Borislav Petkov To: Tom Lendacky Cc: Brijesh Singh , 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 , "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 , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part1 v5 33/38] x86/sev: Provide support for SNP guest request NAEs Message-ID: References: <20210820151933.22401-1-brijesh.singh@amd.com> <20210820151933.22401-34-brijesh.singh@amd.com> <4acd17bc-bdb0-c4cc-97af-8842f8836c8e@amd.com> <20005c9e-fd82-5c96-7bfb-8b072e5d66e6@amd.com> Precedence: bulk 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 In-Reply-To: <20005c9e-fd82-5c96-7bfb-8b072e5d66e6@amd.com> On Fri, Aug 27, 2021 at 02:57:11PM -0500, Tom Lendacky wrote: > The main thing about this is that it is an error code from the HV on > extended guest requests. The HV error code sits in the high-order 32-bits of > the SW_EXIT_INFO_2 field. So defining it either way seems a bit confusing. > To me, the value should just be 1ULL and then it should be shifted when > assigning it to the SW_EXIT_INFO_2. Err, that's from the GHCB spec: "The hypervisor must validate that the guest has supplied enough pages ... certificate data in the RBX register and set the SW_EXITINFO2 field to 0x0000000100000000." So if you wanna do the above, you need to fix the spec first. I'd say. :-) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette