tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c | 9 +++++++++ tools/libs/guest/xg_dom_decompress_unsafe_xz.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-)
With introduction of the new byteswap infrastructure the build of
libxenguest for stubdoms was broken. Fix that again.
Fixes: 60dcff871e34 ("xen/decompressors: Remove use of *_to_cpup() helpers")
Signed-off-by: Juergen Gross <jgross@suse.com>
---
tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c | 9 +++++++++
tools/libs/guest/xg_dom_decompress_unsafe_xz.c | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
index ca2f37d915..356f228718 100644
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
+++ b/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
@@ -25,6 +25,15 @@ static inline uint16_t be16_to_cpu(const uint16_t v)
#endif
}
+static inline uint32_t be32_to_cpu(const uint32_t v)
+{
+#if BYTE_ORDER == LITTLE_ENDIAN
+ return __builtin_bswap32(v);
+#else
+ return v;
+#endif
+}
+
#include "../../xen/common/lzo.c"
#include "../../xen/common/unlzo.c"
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
index 1f52875340..0501f7f693 100644
--- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
+++ b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
@@ -25,7 +25,7 @@ static inline uint32_t cpu_to_le32(const uint32_t v)
#endif
}
-static inline uint32_t le32_to_cpu(const uint32_t p)
+static inline uint32_t le32_to_cpu(const uint32_t v)
{
#if BYTE_ORDER == BIG_ENDIAN
return __builtin_bswap32(v);
--
2.43.0
On 2025-06-25 06:33, Juergen Gross wrote:
> With introduction of the new byteswap infrastructure the build of
> libxenguest for stubdoms was broken. Fix that again.
>
> Fixes: 60dcff871e34 ("xen/decompressors: Remove use of *_to_cpup() helpers")
> Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
On Wed, Jun 25, 2025 at 09:20:05AM -0400, Jason Andryuk wrote:
> On 2025-06-25 06:33, Juergen Gross wrote:
> > With introduction of the new byteswap infrastructure the build of
> > libxenguest for stubdoms was broken. Fix that again.
> >
> > Fixes: 60dcff871e34 ("xen/decompressors: Remove use of *_to_cpup() helpers")
> > Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony PERARD
On 25/06/2025 11:33 am, Juergen Gross wrote:
> With introduction of the new byteswap infrastructure the build of
> libxenguest for stubdoms was broken. Fix that again.
>
> Fixes: 60dcff871e34 ("xen/decompressors: Remove use of *_to_cpup() helpers")
> Signed-off-by: Juergen Gross <jgross@suse.com>
Sorry for breaking this. The decompressors are an intractable mess.
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
© 2016 - 2025 Red Hat, Inc.