* [PATCH] i386/tdx: Fix build on 32-bit host
@ 2025-06-23 8:03 Cédric Le Goater
0 siblings, 0 replies; only message in thread
From: Cédric Le Goater @ 2025-06-23 8:03 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Xiaoyao Li, Isaku Yamahata, Cédric Le Goater
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
target/i386/kvm/tdx-quote-generator.c | 6 +++---
target/i386/kvm/tdx.c | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/target/i386/kvm/tdx-quote-generator.c b/target/i386/kvm/tdx-quote-generator.c
index f59715f61751..3a31a4a68365 100644
--- a/target/i386/kvm/tdx-quote-generator.c
+++ b/target/i386/kvm/tdx-quote-generator.c
@@ -113,7 +113,7 @@ static gboolean tdx_get_quote_read(QIOChannel *ioc, GIOCondition condition,
task->receive_buf_received);
if (len == 0 ||
len > (task->payload_len - HEADER_SIZE)) {
- error_report("Message len %u must be non-zero & less than %zu",
+ error_report("Message len %u must be non-zero & less than %"PRIu64,
len, (task->payload_len - HEADER_SIZE));
task->status_code = TDX_VP_GET_QUOTE_ERROR;
goto end;
@@ -143,7 +143,7 @@ static gboolean tdx_get_quote_read(QIOChannel *ioc, GIOCondition condition,
goto end;
}
if (hdr->size > (task->payload_len - HEADER_SIZE)) {
- error_report("QGS message size %d exceeds payload capacity %zu",
+ error_report("QGS message size %d exceeds payload capacity %"PRIu64,
hdr->size, task->payload_len);
task->status_code = TDX_VP_GET_QUOTE_ERROR;
goto end;
@@ -166,7 +166,7 @@ static gboolean tdx_get_quote_read(QIOChannel *ioc, GIOCondition condition,
if ((task->payload_len - HEADER_SIZE - sizeof(qgs_msg_get_quote_resp_t)) !=
msg->quote_size) {
- error_report("QGS quote size %d should be %zu",
+ error_report("QGS quote size %d should be %"PRIu64,
msg->quote_size,
(task->payload_len - sizeof(qgs_msg_get_quote_resp_t)));
task->status_code = TDX_VP_GET_QUOTE_ERROR;
diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c
index e809e4b2dfa2..c98109dadc2e 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -1035,8 +1035,8 @@ int tdx_pre_create_vcpu(CPUState *cpu, Error **errp)
return -1;
}
if (data_len != QCRYPTO_HASH_DIGEST_LEN_SHA384) {
- error_setg(errp, "TDX 'mrconfigid' sha384 digest was %ld bytes, "
- "expected %d bytes", data_len,
+ error_setg(errp, "TDX 'mrconfigid' sha384 digest was %"PRId64" bytes, "
+ "expected %d bytes", (uint64_t)data_len,
QCRYPTO_HASH_DIGEST_LEN_SHA384);
return -1;
}
@@ -1050,8 +1050,8 @@ int tdx_pre_create_vcpu(CPUState *cpu, Error **errp)
return -1;
}
if (data_len != QCRYPTO_HASH_DIGEST_LEN_SHA384) {
- error_setg(errp, "TDX 'mrowner' sha384 digest was %ld bytes, "
- "expected %d bytes", data_len,
+ error_setg(errp, "TDX 'mrowner' sha384 digest was %"PRId64" bytes, "
+ "expected %d bytes", (uint64_t)data_len,
QCRYPTO_HASH_DIGEST_LEN_SHA384);
return -1;
}
@@ -1065,8 +1065,8 @@ int tdx_pre_create_vcpu(CPUState *cpu, Error **errp)
return -1;
}
if (data_len != QCRYPTO_HASH_DIGEST_LEN_SHA384) {
- error_setg(errp, "TDX 'mrownerconfig' sha384 digest was %ld bytes, "
- "expected %d bytes", data_len,
+ error_setg(errp, "TDX 'mrownerconfig' sha384 digest was %"PRId64" bytes, "
+ "expected %d bytes", (uint64_t)data_len,
QCRYPTO_HASH_DIGEST_LEN_SHA384);
return -1;
}
--
2.49.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-23 8:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 8:03 [PATCH] i386/tdx: Fix build on 32-bit host Cédric Le Goater
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).