lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -v2 04/11] virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()
Date
From: "Borislav Petkov (AMD)" <bp@alien8.de>

Call the function directly instead.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <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 5b4cddf44a3a..c0ecc5885573 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -388,7 +388,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);
@@ -396,17 +397,14 @@ 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;
}

/* Increment to new message sequence after payload decryption was successful. */
snp_inc_msg_seqno(snp_dev);

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
\
 
 \ /
  Last update: 2023-03-27 00:30    [W:0.058 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site