Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp848480pxb; Wed, 6 Apr 2022 01:50:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0wKXP4cdi5CBxgiq5O/ABM4PyF8uuWRmssPcvHWLHFxs1aLmahTRRmUNKF5BxageFipk8 X-Received: by 2002:a63:2113:0:b0:399:2df0:ff07 with SMTP id h19-20020a632113000000b003992df0ff07mr6143088pgh.374.1649235002422; Wed, 06 Apr 2022 01:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649235002; cv=none; d=google.com; s=arc-20160816; b=iHsLmfObflJ5U0zzpZDT6a2c64uO6HMVQCcvgehI4OngZfMpUcOHQnQvmE6SEsGq1s eIcu6tXWNds9m0lXnLqejhH3l86R/cU6KYpUvDhVvQYYbr+hirk4N32vqBW0DxMhgZ4Y JsqeAfkMZXiohlWQ53qmVhUZNklZd2HVeOikQ/eITCxPjw8EC4OR+pqxWdR344nVxGtf 25rawKeH4JjNfH9aTkSGgJpcoDMmlaPHXwIMb8pnMwHvK/jwNMUp6D5HffVtfLkKQYbA kdbAe5vfboLKu8tanN8F2Piw7La9QmEFgvQVa/sSFL7ejabLUBF/bX9RvnuAYyYJd8oC RerA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=SH++pPXt5/MXSBZwUFXzyKmchSB5rWCVJKOal0mJc68=; b=lZk4uxKtAsCGfCtZq815HtagAj/X3QSqeFL0c22smOjVil6QGX0R8/cpmmIzKkmapi If4SY+XyK5C3KrFy+s9121JS59YrKDZ4x6+FtxZA5edTBgut54OL/3qnw6vn6TrM9gHt ahHpWrjf8a85ZPHbqnoJsZ5Q/oGYAE5s5kRejEvMqrVEWoXS6mYuukJNeWvcY5KjlTpa DXqMi4LwjlHkmH3lmOUsao/j48SJCOoZMilGwxcUZSR7Gq4XXz0NaLxUF1gnfu4OY3ym Wqaq7HSL1SlMkN/UhDTacjhPDAF3HKUJ+xF6N1cm3DPbRa6OTccYjkfZ6UzcZpZWdY4R 3U7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qOYLmLAh; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d15-20020a056a00198f00b004faecd78afesi15606093pfl.255.2022.04.06.01.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 01:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qOYLmLAh; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8FD4956D991; Wed, 6 Apr 2022 01:34:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353614AbiDEWub (ORCPT + 99 others); Tue, 5 Apr 2022 18:50:31 -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: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 The following commit has been merged into the x86/sev branch of tip: Commit-ID: 453e580abcdb53f688d5711c68bec96bea35430d Gitweb: https://git.kernel.org/tip/453e580abcdb53f688d5711c68bec96bea35430d 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); - while (true) - halt(); + sev_es_terminate(GHCB_SEV_ES_GEN_REQ); }