[PATCH 4/4] x86/sev: Drop unnecessary parameter in snp_issue_guest_request

Alexey Kardashevskiy posted 4 patches 9 months, 1 week ago
There is a newer version of this series
[PATCH 4/4] x86/sev: Drop unnecessary parameter in snp_issue_guest_request
Posted by Alexey Kardashevskiy 9 months, 1 week ago
Commit 3e385c0d6ce8 ("virt: sev-guest: Move SNP Guest Request data
pages handling under snp_cmd_mutex")

moved @input from snp_msg_desc to snp_guest_req which is passed to
snp_issue_guest_request().

Drop the extra parameter.

No functional change intended.

Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
---
 arch/x86/coco/sev/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c
index 0b714df62445..0334c40a5c8d 100644
--- a/arch/x86/coco/sev/core.c
+++ b/arch/x86/coco/sev/core.c
@@ -1322,8 +1322,9 @@ int snp_issue_svsm_attest_req(u64 call_id, struct svsm_call *call,
 }
 EXPORT_SYMBOL_GPL(snp_issue_svsm_attest_req);
 
-static int snp_issue_guest_request(struct snp_guest_req *req, struct snp_req_data *input)
+static int snp_issue_guest_request(struct snp_guest_req *req)
 {
+	struct snp_req_data *input = &req->input;
 	struct ghcb_state state;
 	struct es_em_ctxt ctxt;
 	unsigned long flags;
@@ -1865,7 +1866,7 @@ static int __handle_guest_request(struct snp_msg_desc *mdesc, struct snp_guest_r
 	 * sequence number must be incremented or the VMPCK must be deleted to
 	 * prevent reuse of the IV.
 	 */
-	rc = snp_issue_guest_request(req, &req->input);
+	rc = snp_issue_guest_request(req);
 	switch (rc) {
 	case -ENOSPC:
 		/*
-- 
2.49.0
Re: [PATCH 4/4] x86/sev: Drop unnecessary parameter in snp_issue_guest_request
Posted by Dionna Amalie Glaze 9 months, 1 week ago
On Mon, May 5, 2025 at 7:14 AM Alexey Kardashevskiy <aik@amd.com> wrote:
>
> Commit 3e385c0d6ce8 ("virt: sev-guest: Move SNP Guest Request data
> pages handling under snp_cmd_mutex")
>
> moved @input from snp_msg_desc to snp_guest_req which is passed to
> snp_issue_guest_request().
>
> Drop the extra parameter.
>
> No functional change intended.
>
> Signed-off-by: Alexey Kardashevskiy <aik@amd.com>

Reviewed-by: Dionna Glaze <dionnaglaze@google.com>



-- 
-Dionna Glaze, PhD, CISSP, CCSP (she/her)