From: Dionna Glaze <dionnaglaze@google.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Dionna Glaze <dionnaglaze@google.com>,
Borislav Petkov <Borislav.Petkov@amd.com>,
Peter Gonda <pgonda@google.com>,
Thomas Lendacky <Thomas.Lendacky@amd.com>
Subject: [PATCH v11 7/7] x86/sev: Remove temporary typedef
Date: Wed, 11 Jan 2023 19:40:01 +0000 [thread overview]
Message-ID: <20230111194001.1947849-8-dionnaglaze@google.com> (raw)
In-Reply-To: <20230111194001.1947849-1-dionnaglaze@google.com>
The sev_guestreq_err_t typedef has served its purpose for cleanly
changing the sev_issue_guest_request signature, so it's no longer
needed.
Cc: Borislav Petkov <Borislav.Petkov@amd.com>
Cc: Peter Gonda <pgonda@google.com>
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
---
arch/x86/include/asm/sev.h | 10 ++--------
arch/x86/kernel/sev.c | 2 +-
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h
index 301e3b69f477..05de34d10d89 100644
--- a/arch/x86/include/asm/sev.h
+++ b/arch/x86/include/asm/sev.h
@@ -133,12 +133,6 @@ struct snp_secrets_page_layout {
u8 rsvd3[3840];
} __packed;
-/*
- * Use a type alias temporarily to cleanly change the snp_issue_guest_request
- * signature cleanly over multiple patches.
- */
-typedef u64 sev_guestreq_err_t;
-
#ifdef CONFIG_AMD_MEM_ENCRYPT
extern struct static_key_false sev_es_enable_key;
extern void __sev_es_ist_enter(struct pt_regs *regs);
@@ -202,7 +196,7 @@ void snp_set_memory_private(unsigned long vaddr, unsigned int npages);
void snp_set_wakeup_secondary_cpu(void);
bool snp_init(struct boot_params *bp);
void __init __noreturn snp_abort(void);
-int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, sev_guestreq_err_t *exitinfo2);
+int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, u64 *exitinfo2);
#else
static inline void sev_es_ist_enter(struct pt_regs *regs) { }
static inline void sev_es_ist_exit(void) { }
@@ -223,7 +217,7 @@ static inline void snp_set_wakeup_secondary_cpu(void) { }
static inline bool snp_init(struct boot_params *bp) { return false; }
static inline void snp_abort(void) { }
static inline int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input,
- sev_guestreq_err_t *exitinfo2)
+ u64 *exitinfo2)
{
return -ENOTTY;
}
diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
index d1a6092b1e03..70b4cbd33c45 100644
--- a/arch/x86/kernel/sev.c
+++ b/arch/x86/kernel/sev.c
@@ -2176,7 +2176,7 @@ static int __init init_sev_config(char *str)
}
__setup("sev=", init_sev_config);
-int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, sev_guestreq_err_t *exitinfo2)
+int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, u64 *exitinfo2)
{
struct ghcb_state state;
struct es_em_ctxt ctxt;
--
2.39.0.314.g84b9a713c41-goog
prev parent reply other threads:[~2023-01-11 19:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 19:39 [PATCH v11 0/7] Add throttling detection to sev-guest Dionna Glaze
2023-01-11 19:39 ` [PATCH v11 1/7] crypto: ccp - Name -1 return value as SEV_RET_NO_FW_CALL Dionna Glaze
2023-01-11 19:39 ` [PATCH v11 2/7] x86/sev: Change snp_guest_issue_request's fw_err Dionna Glaze
2023-01-20 14:09 ` Borislav Petkov
2023-01-20 18:03 ` Dionna Amalie Glaze
2023-01-20 18:50 ` Borislav Petkov
2023-01-11 19:39 ` [PATCH v11 3/7] virt: sev-guest: Remove err in handle_guest_request Dionna Glaze
2023-01-11 19:39 ` [PATCH v11 4/7] virt: sev-guest: interpret VMM errors from guest request Dionna Glaze
2023-01-11 19:39 ` [PATCH v11 5/7] x86/sev: Change sev_guestreq_err_t to u64 Dionna Glaze
2023-01-11 19:40 ` [PATCH v11 6/7] virt/coco/sev-guest: Remove dependence on sev_guestreq_t Dionna Glaze
2023-01-11 19:40 ` Dionna Glaze [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230111194001.1947849-8-dionnaglaze@google.com \
--to=dionnaglaze@google.com \
--cc=Borislav.Petkov@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pgonda@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).