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.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,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 E325BC433DF for ; Thu, 4 Jun 2020 12:07:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A28B1206E6 for ; Thu, 4 Jun 2020 12:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728328AbgFDMHx (ORCPT ); Thu, 4 Jun 2020 08:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728132AbgFDMHw (ORCPT ); Thu, 4 Jun 2020 08:07:52 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6806AC03E96D; Thu, 4 Jun 2020 05:07:52 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id F3ED126F; Thu, 4 Jun 2020 14:07:50 +0200 (CEST) Date: Thu, 4 Jun 2020 14:07:49 +0200 From: Joerg Roedel To: Borislav Petkov Cc: x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Joerg Roedel , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v3 42/75] x86/sev-es: Setup GHCB based boot #VC handler Message-ID: <20200604120749.GC30945@8bytes.org> References: <20200428151725.31091-1-joro@8bytes.org> <20200428151725.31091-43-joro@8bytes.org> <20200520192230.GK1457@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200520192230.GK1457@zn.tnic> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 09:22:30PM +0200, Borislav Petkov wrote: > On Tue, Apr 28, 2020 at 05:16:52PM +0200, Joerg Roedel wrote: > > diff --git a/arch/x86/include/asm/sev-es.h b/arch/x86/include/asm/sev-es.h > > index b2cbcd40b52e..e1ed963a57ec 100644 > > --- a/arch/x86/include/asm/sev-es.h > > +++ b/arch/x86/include/asm/sev-es.h > > @@ -74,5 +74,6 @@ static inline u64 lower_bits(u64 val, unsigned int bits) > > } > > > > extern void vc_no_ghcb(void); > > +extern bool vc_boot_ghcb(struct pt_regs *regs); > > Those function names need verbs: > > handle_vc_no_ghcb > handle_vc_boot_ghcb This are IDT entry points and the names above follow the convention for them, like e.g. 'page_fault', 'nmi' or 'general_protection'. Should I still add the verbs or just add a comment explaining what those symbols are? > There's already another sev_es_setup_ghcb() in compressed/. All those > functions with the same name are just confusion waiting to happen. Let's > prepend the ones in compressed/ with "early_" or so, so that their names > are at least different even if they're in two different files with the > same name. > > This way you know at least which function is used in which boot stages. Okay, will see what can be changed. Some functions are part of the interface for sev-es-shared.c and need to have the same names, but sev_es_setup_ghcb() can be named differently. > > +static void __init vc_early_vc_forward_exception(struct es_em_ctxt *ctxt) > > That second "vc" looks redundant. Heh, search and replace artifact :) Fixed now. Joerg