Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2895618pxb; Sat, 23 Oct 2021 10:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1aUPR8bV0I/0wotdXNNFwhnYahpXXSIkPiGkBMR8n/9sRCRLWXx+CL7rgfw6DkTgYZOvx X-Received: by 2002:a50:e005:: with SMTP id e5mr10562440edl.211.1635010486923; Sat, 23 Oct 2021 10:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635010486; cv=none; d=google.com; s=arc-20160816; b=iFy7nCxu0Vc4BHtRRtIDVuRaLvzUMXbSRheFB8daWq2tesHTBwbbVF++4sUq37Z1We bC+CiM0nTKLbdrho7gLv8APL7F5NkbWUBJY8FAO4DTtRDRwIqMtGntRMVjXk8iM8jftE h/CiQd74N3LsMFDzuZvOZofrtlNqfJB/ydqNBZmPTD1YipS9b8yhXoxTzBRBIuOs5flb sYfvJNg5DzCSRTukvPtepHYAdxnFk9sxUgGpTXlwt1UInUKHFoVE3j4Ph5lUtfpGcklj /oQbVpb6QezI6O3ucUdzjR0fKRWDa1zXuZpe0Ajun+45GpYZajgaFIEDauirik/SfUdY iBsg== 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=45GSEYozrA6ceNXIM9Vtl2tPbqIpym/GAi+hphvjLik=; b=ogdAj1ca7thbl/3voU4P+bW7xFmkMQajbxlX6HYrD044l4UKg+8GJeKfXqmAwutjOk dVAcgI+lHeuw8ZoDA17io6SMEkkG5squDL1N2BdgbcDtKNn6vGDZG5n6D+y1wDHFo7BZ t4SpxAHcNSbnAGrZeOWS7eS87XW7jRks0For3h3CjjyDsV9oAXHJrnrIBP9m5yiEOzbH b0DlsIa0zDhOpKVpQMh4LiKQjb0PMgoU9MtFA0wZMa5Z5/9NaO5kCZ4N9X57lQPt45Nm racvElnEAtpbaQVrO+myxPtjoLkMeL0GQfvAHkxcs1TV6rdsTmbEccW+ObI/67/tA/OO k4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=eXYNK94H; 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 mp15si24705836ejc.733.2021.10.23.10.34.19; Sat, 23 Oct 2021 10:34:46 -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=eXYNK94H; 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 S230253AbhJWRcK (ORCPT + 99 others); Sat, 23 Oct 2021 13:32:10 -0400 Received: from mail.skyhub.de ([5.9.137.197]:55486 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230037AbhJWRcH (ORCPT ); Sat, 23 Oct 2021 13:32:07 -0400 Received: from zn.tnic (p200300ec2f2bf500debdb0fdbaba34b4.dip0.t-ipconnect.de [IPv6:2003:ec:2f2b:f500:debd:b0fd:baba:34b4]) (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 A9A5E1EC01FC; Sat, 23 Oct 2021 19:29:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1635010186; 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=45GSEYozrA6ceNXIM9Vtl2tPbqIpym/GAi+hphvjLik=; b=eXYNK94H7HLUf6jjICKv1ghrrFt3DJckkQbAhzjHnoRDdocKXs45y5+f8f1K1+DsajwbMZ p2kvrlEmAakg9KLeojR4eXMe3vV9dCEAG0UWgftJDZEkYRjvnHHTUTFnrIsjUJkc6wthGS nbjtselR4hNzTYzec+YWA+ueywUR46U= Date: Sat, 23 Oct 2021 19:29:43 +0200 From: Borislav Petkov To: Michael Kelley Cc: Tianyu Lan , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , Dexuan Cui , "tglx@linutronix.de" , "mingo@redhat.com" , "x86@kernel.org" , "hpa@zytor.com" , "dave.hansen@linux.intel.com" , "luto@kernel.org" , "peterz@infradead.org" , "davem@davemloft.net" , "kuba@kernel.org" , "gregkh@linuxfoundation.org" , "arnd@arndb.de" , "brijesh.singh@amd.com" , "jroedel@suse.de" , Tianyu Lan , "thomas.lendacky@amd.com" , "pgonda@google.com" , "akpm@linux-foundation.org" , "kirill.shutemov@linux.intel.com" , "rppt@kernel.org" , "david@redhat.com" , "aneesh.kumar@linux.ibm.com" , "saravanand@fb.com" , "rientjes@google.com" , "linux-arch@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , vkuznets , "konrad.wilk@oracle.com" , "hch@lst.de" , "robin.murphy@arm.com" , "joro@8bytes.org" , "parri.andrea@gmail.com" , "dave.hansen@intel.com" Subject: Re: [PATCH V8.1 5/9] x86/sev-es: Expose sev_es_ghcb_hv_call() to call ghcb hv call out of sev code Message-ID: References: <20211021154110.3734294-6-ltykernel@gmail.com> <20211022133721.2123-1-ltykernel@gmail.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-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 08:58:00PM +0000, Michael Kelley wrote: > > static inline void sev_es_ist_enter(struct pt_regs *regs) { } > > static inline void sev_es_ist_exit(void) { } > > static inline int sev_es_setup_ap_jump_table(struct real_mode_header *rmh) { return 0; } > > static inline void sev_es_nmi_complete(void) { } > > static inline int sev_es_efi_map_ghcbs(pgd_t *pgd) { return 0; } > > +static inline enum > > +es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, > > + bool set_ghcb_msr, u64 exit_code, > > The "struct es_em_ctxt *ctxt" argument is missing from this declaration, > which would presumably produce a compile error. Which raises the more important question: that ivm.c thing which is going to be that function's user gets enabled unconditionally in HyperV's Makefile so maybe you guys wanna consider perhaps making that isolation VM functionality dependent on CONFIG_AMD_MEM_ENCRYPT because without it, it would be useless. And if you add that dependency, you probably won't need the stub as outside of AMD SEV, nothing else will be using that function. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette