Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1611746pxp; Mon, 21 Mar 2022 00:24:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2M75qZOWvL2pFVwLegTifAgZ1w97q/oMds6IcgARuJWVJQa/bAxyQfXTRXsqv1O3Nwy3l X-Received: by 2002:aa7:9111:0:b0:4fa:5cc4:a5c2 with SMTP id 17-20020aa79111000000b004fa5cc4a5c2mr18880368pfh.63.1647847441634; Mon, 21 Mar 2022 00:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647847441; cv=none; d=google.com; s=arc-20160816; b=uFEjAxHuAq0t8hRpvnozSmHGsNiKZ0B/UmowpZ6dRYljREqoegi8BgA+m7mKXoa7LX i/8n/qrmDLReaNrjPbO14s/kcEnjbtMvs73n/Vn/JLBxnn358xdMYHmTC2S5FlWiMZkD S3eaBgzdpkS3hHcAUpOw9ibUpSTm4duT/0QxwYZ10afqQ0TsMI3IhjuX0qnNUrPmLDGc WAfQViv1sTZ7+4CjsmnR7HeDEWW2slbWUItu0MwOnsxHFy8hIIjeQ4qSxd3S3s+Eh1HF NFC+0YEwQAeqnUnzFwRjYePNvjR1Q0yn6YGXKgNePMFcLkJgpJziM+iur/aDMHFgDGMQ Tebg== 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 :dkim-signature; bh=dCd/2Xnvy12wap7uukyIoQcrVYhnZ+Ii3tvlTmlfPLk=; b=W6VgeNQUidbIIdHoOa+Ec6+doU1L/aG9uJV7rStgf2ivtr/rKCoLE+atq3NLcsiCjt pXcwrTmD7D431CRv+WbLcO5kIrRc8eonZ+3nAIizDE31/x7b4hlt/y56wJHbAZ5GciKu ul1s8dYHVt6eL6OZFRIYjqRPvCIF4/AdsV1BNZuiiBvan3qPOE6euLtasJ+osyfKmwNv 3HAXwcIfSLHScyfvWAT/GdnolDwiiUyNUhx02aA8XptMOaiQBY+VCYmS2NNv6B1CihQh 5ostWRjuo5RKoyhk5BJMOVsHV51/EIGQa6Ma/QB0xxLF+WUs8Jk+Vwoub455c3e7g8km P3ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=k97XBkdO; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a630d10000000b0038265eb2c1csi4991640pgl.467.2022.03.21.00.23.48; Mon, 21 Mar 2022 00:24:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=k97XBkdO; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233990AbiCRIwu (ORCPT + 99 others); Fri, 18 Mar 2022 04:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233979AbiCRIwp (ORCPT ); Fri, 18 Mar 2022 04:52:45 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E7F4FFFA3; Fri, 18 Mar 2022 01:51:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BAAB11F37F; Fri, 18 Mar 2022 08:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647593485; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dCd/2Xnvy12wap7uukyIoQcrVYhnZ+Ii3tvlTmlfPLk=; b=k97XBkdOaWpyObRAY2A3efiSjth20cgIVnSJQNd15wy6q1cdlY+nFA1EaOz+nxacAHEr3F KpOVYJpaQB+aC9So0sAltiUIfY3DuwYYS3giwbbc5YOt55GEUCL5fdBq1c5jooAmonwQWG X81uZz2J11iIjz+9Td+Z1as7MnSEGv0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647593485; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dCd/2Xnvy12wap7uukyIoQcrVYhnZ+Ii3tvlTmlfPLk=; b=dHaEv1N9LKhMerX3XKzfPCSifvdq3jm1bKkyZtMXKkz15Dp5xvPukA6TNcS9OUNzMWkhn4 yyMyTnRaqJ/7YgDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7437913BB5; Fri, 18 Mar 2022 08:51:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TLWtGg1INGI0MgAAMHmgww (envelope-from ); Fri, 18 Mar 2022 08:51:25 +0000 Date: Fri, 18 Mar 2022 09:51:23 +0100 From: Joerg Roedel To: Peter Gonda Cc: x86@kernel.org, Borislav Petkov , Tom Lendacky , Brijesh Singh , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/sev-es: Replace open-coded hlt-loop with sev_es_terminate() Message-ID: References: <20220317211913.1397427-1-pgonda@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220317211913.1397427-1-pgonda@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 17, 2022 at 02:19:13PM -0700, Peter Gonda wrote: > Replace the hlt loop in handle_vc_boot_ghcb() with an > sev_es_terminate(). The hlt gives the system no indication the guest is > unhappy. The termination request will signal there was an error during > VC handling during boot. > > > Cc: Borislav Petkov > Cc: Tom Lendacky > Cc: Brijesh Singh > Cc: Joerg Roedel > Cc: x86@kernel.org > Cc: kvm@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Peter Gonda > --- > arch/x86/kernel/sev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c > index e6d316a01fdd..ae87fbf27724 100644 > --- a/arch/x86/kernel/sev.c > +++ b/arch/x86/kernel/sev.c > @@ -1425,6 +1425,5 @@ bool __init handle_vc_boot_ghcb(struct pt_regs *regs) > fail: > show_regs(regs); > > - while (true) > - halt(); > + sev_es_terminate(GHCB_SEV_ES_GEN_REQ); Reviewed-by: Joerg Roedel