[PATCH 1/3] igvm: switch to PRIx64

Luigi Leonardi posted 3 patches 2 days, 15 hours ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, Ani Sinha <anisinha@redhat.com>
[PATCH 1/3] igvm: switch to PRIx64
Posted by Luigi Leonardi 2 days, 15 hours ago
Use the PRIx64 format macro instead of %lX for uint64_t values.

This is to improve portability as %lX is not necessarily 64 bit long.

Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
---
 backends/igvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backends/igvm.c b/backends/igvm.c
index 3b5edf15213c845132d0d4c05144a18992f1816e..50f0d6fb9a7bacddce91f095b6e2710ecbc79c6f 100644
--- a/backends/igvm.c
+++ b/backends/igvm.c
@@ -187,7 +187,7 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t addr, uint64_t size,
             error_setg(
                 errp,
                 "Processing of IGVM file failed: Could not prepare memory "
-                "at address 0x%lX due to existing non-RAM region",
+                "at address 0x%" PRIx64 " due to existing non-RAM region",
                 addr);
             return NULL;
         }
@@ -198,7 +198,7 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t addr, uint64_t size,
             error_setg(
                 errp,
                 "Processing of IGVM file failed: Could not prepare memory "
-                "at address 0x%lX: region size exceeded",
+                "at address 0x%" PRIx64 ": region size exceeded",
                 addr);
             return NULL;
         }

-- 
2.53.0
Re: [PATCH 1/3] igvm: switch to PRIx64
Posted by Ani Sinha 1 day, 22 hours ago

> On 30 Mar 2026, at 6:13 PM, Luigi Leonardi <leonardi@redhat.com> wrote:
> 
> Use the PRIx64 format macro instead of %lX for uint64_t values.
> 
> This is to improve portability as %lX is not necessarily 64 bit long.
> 
> Signed-off-by: Luigi Leonardi <leonardi@redhat.com>

Reviewed-by: Ani Sinha <anisinha@redhat.com>

> ---
> backends/igvm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/backends/igvm.c b/backends/igvm.c
> index 3b5edf15213c845132d0d4c05144a18992f1816e..50f0d6fb9a7bacddce91f095b6e2710ecbc79c6f 100644
> --- a/backends/igvm.c
> +++ b/backends/igvm.c
> @@ -187,7 +187,7 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t addr, uint64_t size,
>             error_setg(
>                 errp,
>                 "Processing of IGVM file failed: Could not prepare memory "
> -                "at address 0x%lX due to existing non-RAM region",
> +                "at address 0x%" PRIx64 " due to existing non-RAM region",
>                 addr);
>             return NULL;
>         }
> @@ -198,7 +198,7 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t addr, uint64_t size,
>             error_setg(
>                 errp,
>                 "Processing of IGVM file failed: Could not prepare memory "
> -                "at address 0x%lX: region size exceeded",
> +                "at address 0x%" PRIx64 ": region size exceeded",
>                 addr);
>             return NULL;
>         }
> 
> -- 
> 2.53.0
>