From patchwork Mon Mar 13 12:58:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 68822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1168937wrd; Mon, 13 Mar 2023 06:00:06 -0700 (PDT) X-Google-Smtp-Source: AK7set9ySqKdTseD43FCzpjcC/qYNOdS+DgGnRa+PGbMlQ96Hzu3aXH0wzf7WVlTx+zx+0R0S1Ay X-Received: by 2002:a05:6a20:8e09:b0:d4:7339:d120 with SMTP id y9-20020a056a208e0900b000d47339d120mr3272045pzj.54.1678712405796; Mon, 13 Mar 2023 06:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678712405; cv=none; d=google.com; s=arc-20160816; b=FmaxFU9E0w1roCwHsOaH/TBiURGwvk/gvvTJbcEvGKJfadDMocxxnXUc81aTPwds8u Kx4FUYSVQY2OaNkxnXM2nZ4ll3sr2PunA6lPX90HcyE4SqpbXTbmlejZWNs28tapf7By RPL763ucH060dOlDyiI7nqiu5zf/1koxctUaVPzBZZTJCbssZoKVbrn1rY2HgfQ/KXdG BSgaE/gGR8SwfHeGOhm4VRzZ3Vis3Ctm2hFmCj6xt44+N7Qj8/u9qcWeRdieuPi4tY9o xFTEza9RJ4Q70iOGrzaFqRpixoqwTmzDHJk2X6f/4QDLQKkvJy29K889h5qv4CI2ncxa GRzQ== 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=2OXuAUmjrjcyymnYbM4tpIO1O5BbWJa7T9d0dN9Q/S8=; b=W7nJQiReAL9s/lZ8dmdNOY06GTwLctQFNiqlH9GXoCFxnVh85twP/wN2PPHUkxa/QP lM7280PQPmIRfqd13cZtDd+IZjZC3Ebj8Q+mCYh/8MsahmduI732S3g4uD1zZke63el6 cT1lo+al2cGb/RQcnSfcL79BWfQ8mV87hS7G1YkyghO+XFyQNSg3WzOXB1q46MljyBsg ENARrquvBr2sAIR18bjCpsD6KTZL4H1QAQLfvu94Y6r5o3bzYPUAxDEuyqSvoehKF/mc pY8gviK5N0r5mreSy6s1zc+PebC45rC29VXuBC7qHEJDp3K+Di6y2BwBfiIcY8Sl7Kla aTjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=w9BRMO6u; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=RryXax9s; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2-20020a656542000000b00503015b772asi6436053pgw.743.2023.03.13.05.59.50; Mon, 13 Mar 2023 06:00:05 -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=@linutronix.de header.s=2020 header.b=w9BRMO6u; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=RryXax9s; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230182AbjCMM6R (ORCPT + 99 others); Mon, 13 Mar 2023 08:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbjCMM6P (ORCPT ); Mon, 13 Mar 2023 08:58:15 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0BC210F; Mon, 13 Mar 2023 05:58:12 -0700 (PDT) Date: Mon, 13 Mar 2023 12:58:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1678712290; 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=2OXuAUmjrjcyymnYbM4tpIO1O5BbWJa7T9d0dN9Q/S8=; b=w9BRMO6uaS82SrO/CnxYy3U4m74c2NwOlCpXBZyMZ63NKrwWxhmFxfaVZpIw1tAR5i0XO1 pyvTrV/Dlyof3NhGki7d707griNfcmrqm3Fen2UOiBJWZfzQXHOCBFEba4jRL6pesTz5qx wdSjR1cqRhOZ1NeF8VlsTV8CD5Vo564DSWva1ekScy/ibWFpSPtIY24zHiR8J1IRy6cVHD mdX0tlQQty2mP4c3jIDw86Fv0TCwrtTrlH7Wiyp6nS+qGQ/t5g+6tKYujK6PX4T8kTM5F0 x0+RK8XRFaYyVBEG3VZEtFOQIAP//utENcJ8Y+mN2/2gYTYQWugVpe9syHxJWQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1678712290; 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=2OXuAUmjrjcyymnYbM4tpIO1O5BbWJa7T9d0dN9Q/S8=; b=RryXax9smgw1rCfh09UtjJUslJ3Q/sVCUs9FVmZdRxcc2SJOR7s+gDCdCB9fI5/n3fHvEC vkTBvPvf3eqImUDw== From: "tip-bot2 for Borislav Petkov (AMD)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() Cc: "Borislav Petkov (AMD)" , Tom Lendacky , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230307192449.24732-5-bp@alien8.de> References: <20230307192449.24732-5-bp@alien8.de> MIME-Version: 1.0 Message-ID: <167871229056.5837.3427915101817135616.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759740272337661957?= X-GMAIL-MSGID: =?utf-8?q?1760257539702447331?= The following commit has been merged into the x86/urgent branch of tip: Commit-ID: c5a338274bdb894f088767bea856be344d0ccaef Gitweb: https://git.kernel.org/tip/c5a338274bdb894f088767bea856be344d0ccaef Author: Borislav Petkov (AMD) AuthorDate: Wed, 15 Feb 2023 11:43:43 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 13 Mar 2023 11:33:41 +01:00 virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() Call the function directly instead. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230307192449.24732-5-bp@alien8.de --- drivers/virt/coco/sev-guest/sev-guest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c index e61db0b..a51bd4a 100644 --- a/drivers/virt/coco/sev-guest/sev-guest.c +++ b/drivers/virt/coco/sev-guest/sev-guest.c @@ -405,7 +405,8 @@ retry_request: dev_alert(snp_dev->dev, "Detected error from ASP request. rc: %d, fw_err: %llu\n", rc, *fw_err); - goto disable_vmpck; + snp_disable_vmpck(snp_dev); + return rc; } rc = verify_and_dec_payload(snp_dev, resp_buf, resp_sz); @@ -413,14 +414,11 @@ retry_request: dev_alert(snp_dev->dev, "Detected unexpected decode failure from ASP. rc: %d\n", rc); - goto disable_vmpck; + snp_disable_vmpck(snp_dev); + return rc; } return 0; - -disable_vmpck: - snp_disable_vmpck(snp_dev); - return rc; } static int get_report(struct snp_guest_dev *snp_dev, struct snp_guest_request_ioctl *arg)