From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: berrange@redhat.com, alex.bennee@linaro.org
Subject: [PATCH 5/5] target/i386: SEV: fix format strings for 32-bit hosts
Date: Thu, 27 Jun 2024 16:53:57 +0200 [thread overview]
Message-ID: <20240627145357.1038664-6-pbonzini@redhat.com> (raw)
In-Reply-To: <20240627145357.1038664-1-pbonzini@redhat.com>
Use PRIx64 for uint64_t and %zu for size_t/gsize.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/sev.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 28d6bd3adfa..77ff908ab17 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -886,7 +886,7 @@ sev_snp_launch_update(SevSnpGuestState *sev_snp_guest,
if (!data->hva || !data->len) {
error_report("SNP_LAUNCH_UPDATE called with invalid address"
- "/ length: %p / %lx",
+ "/ length: %p / %" PRIx64,
data->hva, data->len);
return 1;
}
@@ -934,8 +934,8 @@ sev_snp_launch_update(SevSnpGuestState *sev_snp_guest,
out:
if (!ret && update.gfn_start << TARGET_PAGE_BITS != data->gpa + data->len) {
- error_report("SEV-SNP: expected update of GPA range %lx-%lx,"
- "got GPA range %lx-%llx",
+ error_report("SEV-SNP: expected update of GPA range %" PRIx64 "-%" PRIx64 ","
+ "got GPA range %" PRIx64 "-%llx",
data->gpa, data->gpa + data->len, data->gpa,
update.gfn_start << TARGET_PAGE_BITS);
ret = -EIO;
@@ -2148,7 +2148,7 @@ sev_snp_guest_set_guest_visible_workarounds(Object *obj, const char *value,
}
if (len != sizeof(start->gosvw)) {
- error_setg(errp, "parameter length of %lu exceeds max of %lu",
+ error_setg(errp, "parameter length of %zu exceeds max of %zu",
len, sizeof(start->gosvw));
return;
}
@@ -2185,7 +2185,7 @@ sev_snp_guest_set_id_block(Object *obj, const char *value, Error **errp)
}
if (len != KVM_SEV_SNP_ID_BLOCK_SIZE) {
- error_setg(errp, "parameter length of %lu not equal to %u",
+ error_setg(errp, "parameter length of %zu not equal to %u",
len, KVM_SEV_SNP_ID_BLOCK_SIZE);
return;
}
@@ -2223,7 +2223,7 @@ sev_snp_guest_set_id_auth(Object *obj, const char *value, Error **errp)
}
if (len > KVM_SEV_SNP_ID_AUTH_SIZE) {
- error_setg(errp, "parameter length:ID_AUTH %lu exceeds max of %u",
+ error_setg(errp, "parameter length:ID_AUTH %zu exceeds max of %u",
len, KVM_SEV_SNP_ID_AUTH_SIZE);
return;
}
@@ -2291,7 +2291,7 @@ sev_snp_guest_set_host_data(Object *obj, const char *value, Error **errp)
}
if (len != sizeof(finish->host_data)) {
- error_setg(errp, "parameter length of %lu not equal to %lu",
+ error_setg(errp, "parameter length of %zu not equal to %zu",
len, sizeof(finish->host_data));
return;
}
--
2.45.2
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 ` [PATCH 3/5] target/i386: SEV: rename sev_snp_guest->id_auth Paolo Bonzini
2024-06-27 16:37 ` 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 ` Paolo Bonzini [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=20240627145357.1038664-6-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).