qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Xiaoyao Li" <xiaoyao.li@intel.com>,
	"Isaku Yamahata" <isaku.yamahata@intel.com>,
	"Cédric Le Goater" <clg@redhat.com>
Subject: [PATCH] i386/tdx: Fix build on 32-bit host
Date: Mon, 23 Jun 2025 10:03:25 +0200	[thread overview]
Message-ID: <20250623080325.462255-1-clg@redhat.com> (raw)

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



                 reply	other threads:[~2025-06-23  8:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250623080325.462255-1-clg@redhat.com \
    --to=clg@redhat.com \
    --cc=isaku.yamahata@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoyao.li@intel.com \
    /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).