From nobody Fri Jun 19 08:33:53 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9029C433FE for ; Tue, 5 Apr 2022 23:02:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444046AbiDEWup (ORCPT ); Tue, 5 Apr 2022 18:50:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573647AbiDET31 (ORCPT ); Tue, 5 Apr 2022 15:29:27 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B46B8BF000; Tue, 5 Apr 2022 12:27:28 -0700 (PDT) Date: Tue, 05 Apr 2022 19:27:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649186847; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SH++pPXt5/MXSBZwUFXzyKmchSB5rWCVJKOal0mJc68=; b=qOYLmLAh6SrCv0U7WUKdx6kDqTdT45JSqFSK7l7WnGZEIQG8EH/o3+VOyTVKy36my+YN1u yQNjG/UhjPr3JEsssUonnTR8ZX9hbs8QBiosXuBLn/SYadeG6fsixMIR4pXFA/UJ56zXIi FBBjzEjKXmligf64RB9EuiIpzVwXQktYi7FiTO2qzpCPcJYlmYtzvezC7ycCW7P+ijPlq7 NtBbhhafIRMbftlDETAevYwRDDPrNf2wv+cdHw6r3+T/Mz26a875Of+LxPnQImWjXnBAf0 KhOMGHzsRKTZyErU2mwOMaUF907dXR22OZVnzop/0vaqjRldRdtshDjYG2sxjw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649186847; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SH++pPXt5/MXSBZwUFXzyKmchSB5rWCVJKOal0mJc68=; b=7QfmmMCDW0T1IbXkwHXAGX9/cOJHP30DP6rOz6x5yGbr8ZySm7EVJBlgDbXsyUUuKRRkAA r4D4Yj9GACKseZAw== From: "tip-bot2 for Peter Gonda" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sev] x86/sev-es: Replace open-coded hlt-loop with sev_es_terminate() Cc: Peter Gonda , Borislav Petkov , Joerg Roedel , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220317211913.1397427-1-pgonda@google.com> References: <20220317211913.1397427-1-pgonda@google.com> MIME-Version: 1.0 Message-ID: <164918684623.389.10520041359552585691.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/sev branch of tip: Commit-ID: 453e580abcdb53f688d5711c68bec96bea35430d Gitweb: https://git.kernel.org/tip/453e580abcdb53f688d5711c68bec96be= a35430d Author: Peter Gonda AuthorDate: Thu, 17 Mar 2022 14:19:13 -07:00 Committer: Borislav Petkov CommitterDate: Tue, 05 Apr 2022 19:33:55 +02:00 x86/sev-es: Replace open-coded hlt-loop with sev_es_terminate() Replace the halt 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. Signed-off-by: Peter Gonda Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Link: https://lore.kernel.org/r/20220317211913.1397427-1-pgonda@google.com --- 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 e6d316a..ae87fbf 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); =20 - while (true) - halt(); + sev_es_terminate(GHCB_SEV_ES_GEN_REQ); }