[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230307192449.24732-5-bp@alien8.de>
Date: Tue, 7 Mar 2023 20:24:42 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Dionna Glaze <dionnaglaze@...gle.com>,
Joerg Roedel <jroedel@...e.de>,
Michael Roth <michael.roth@....com>,
Nikunj A Dadhania <nikunj@....com>,
Peter Gonda <pgonda@...gle.com>,
Tom Lendacky <Thomas.Lendacky@....com>,
linux-coco@...ts.linux.dev, x86@...nel.org
Subject: [PATCH -v3 04/11] virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()
From: "Borislav Petkov (AMD)" <bp@...en8.de>
Call the function directly instead.
No functional changes.
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.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 e61db0b15b7a..a51bd4afd5ab 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -405,7 +405,8 @@ static int handle_guest_request(struct snp_guest_dev *snp_dev, u64 exit_code, in
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 @@ static int handle_guest_request(struct snp_guest_dev *snp_dev, u64 exit_code, in
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)
--
2.35.1
Powered by blists - more mailing lists