From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: berrange@redhat.com, alex.bennee@linaro.org
Subject: [PATCH 3/5] target/i386: SEV: rename sev_snp_guest->id_auth
Date: Thu, 27 Jun 2024 16:53:55 +0200 [thread overview]
Message-ID: <20240627145357.1038664-4-pbonzini@redhat.com> (raw)
In-Reply-To: <20240627145357.1038664-1-pbonzini@redhat.com>
Free the "id_auth" name for the binary version of the data.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/sev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 2d4cfd41e83..a6b063b762c 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -154,7 +154,7 @@ struct SevSnpGuestState {
char *guest_visible_workarounds;
char *id_block_base64;
uint8_t *id_block;
- char *id_auth;
+ char *id_auth_base64;
char *host_data;
struct kvm_sev_snp_launch_start kvm_start_conf;
@@ -1297,7 +1297,7 @@ sev_snp_launch_finish(SevCommonState *sev_common)
}
}
- trace_kvm_sev_snp_launch_finish(sev_snp->id_block_base64, sev_snp->id_auth,
+ trace_kvm_sev_snp_launch_finish(sev_snp->id_block_base64, sev_snp->id_auth_base64,
sev_snp->host_data);
ret = sev_ioctl(sev_common->sev_fd, KVM_SEV_SNP_LAUNCH_FINISH,
finish, &error);
@@ -2198,7 +2198,7 @@ sev_snp_guest_get_id_auth(Object *obj, Error **errp)
{
SevSnpGuestState *sev_snp_guest = SEV_SNP_GUEST(obj);
- return g_strdup(sev_snp_guest->id_auth);
+ return g_strdup(sev_snp_guest->id_auth_base64);
}
static void
@@ -2208,14 +2208,14 @@ sev_snp_guest_set_id_auth(Object *obj, const char *value, Error **errp)
struct kvm_sev_snp_launch_finish *finish = &sev_snp_guest->kvm_finish_conf;
gsize len;
- g_free(sev_snp_guest->id_auth);
+ g_free(sev_snp_guest->id_auth_base64);
g_free((guchar *)finish->id_auth_uaddr);
/* store the base64 str so we don't need to re-encode in getter */
- sev_snp_guest->id_auth = g_strdup(value);
+ sev_snp_guest->id_auth_base64 = g_strdup(value);
finish->id_auth_uaddr =
- (uint64_t)qbase64_decode(sev_snp_guest->id_auth, -1, &len, errp);
+ (uint64_t)qbase64_decode(sev_snp_guest->id_auth_base64, -1, &len, errp);
if (!finish->id_auth_uaddr) {
return;
--
2.45.2
next prev parent reply other threads:[~2024-06-27 14:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 14:53 [PATCH 0/5] target/i386: SEV: fix compiler warnings on 32-bit hosts Paolo Bonzini
2024-06-27 14:53 ` [PATCH 1/5] target/i386: SEV: rename sev_snp_guest->id_block Paolo Bonzini
2024-06-27 16:36 ` Richard Henderson
2024-06-27 14:53 ` [PATCH 2/5] target/i386: SEV: store pointer to decoded id_block in SevSnpGuest Paolo Bonzini
2024-06-27 16:36 ` Richard Henderson
2024-06-27 14:53 ` Paolo Bonzini [this message]
2024-06-27 16:37 ` [PATCH 3/5] target/i386: SEV: rename sev_snp_guest->id_auth Richard Henderson
2024-06-27 14:53 ` [PATCH 4/5] target/i386: SEV: store pointer to decoded id_auth in SevSnpGuest Paolo Bonzini
2024-06-27 16:37 ` Richard Henderson
2024-06-27 14:53 ` [PATCH 5/5] target/i386: SEV: fix format strings for 32-bit hosts Paolo Bonzini
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=20240627145357.1038664-4-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.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).