Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1624454pxb; Fri, 27 Aug 2021 13:19:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/PRj83L1Eg/hCsc7UpkY9WfijgHKISmJZOwpdewaD/DMVn+elQDg0GAQWAbOgFJYpokQY X-Received: by 2002:a02:850a:: with SMTP id g10mr9592596jai.134.1630095556431; Fri, 27 Aug 2021 13:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630095556; cv=none; d=google.com; s=arc-20160816; b=cV2oBVDinXJX7ykrpNX0DcGoGCrri+svev52j2Or2ZnzpQ3W7NWgA3DqLCDrTyP2ce ZSIha0mT7oO5SWWy5LaqDIYWo5KNsosbrnP/piMKiFxo0tr6HMWXn3YlRzFSbzwWUezi efdNwEdukMaI4HK+Dlc+rER50wHFdQvABFAEHwrFp8j/JCWvgzTxvm7aQi9xe32LNsJP BpkRSPeCBIIOiZiOytLK0zI2HylRBEsHums0+XxbnnvhJ5e5Tkcs79PKtBfqg2kpZYCb jZouDgU/aZXMSwnBUd02bl9ypDx9sxstwtH7zS+I9m55eUZNeOfw/5BhaIOm+/DB6gJD Xo0Q== 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=hCYoAQ41iPdcZpGqXz/s23YuGJNo/dQNa8YAMDCU2HY=; b=pSWdhfEd+9WndwDuwVDmQ6ZGrUBdBcU5CjsMVu8LPGFa4V1wDZ90GY9pP4mlUazXy0 R57UQo+vTx26CCPY2FDOKodCqj1W7JIYPaOp2X3l+cjAz/cDGwAPvkYt4g6SlC1Ecp9+ v/NbFkEJVyvtle8YsPJyqTCy4TG4OsTMzQSY+cIjszhYBBhmN+Gt0q3ql//P3weu0SM3 vjndFEaTDsyixDrr/f/joXF6a0XBa4e7/thzR92pMjafD3uNpTqakjjBGHweGzlHn8JH fAPKaP+9Ks6XlRuTq0RGnFRjsGl1UWLVFLXv/0jnoKYJ/1Dlz1fIMwkYJsr5jlw1bAXI KwUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=GjwdFy7q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si7328952jak.117.2021.08.27.13.19.04; Fri, 27 Aug 2021 13:19:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=GjwdFy7q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231618AbhH0URn (ORCPT + 99 others); Fri, 27 Aug 2021 16:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231167AbhH0URm (ORCPT ); Fri, 27 Aug 2021 16:17:42 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A3A7C0613D9; Fri, 27 Aug 2021 13:16:53 -0700 (PDT) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20005c9e-fd82-5c96-7bfb-8b072e5d66e6@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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