On 10/19/26 21:55, Eric Farman wrote:
Running make check-tcg-x86_64 on a big-endian host (e.g., s390x) fails due
to problems reading/parsing the ELF data:

   qemu-system-x86_64: Error loading uncompressed kernel without PVH ELF Note

There already exists logic in include/hw/elf_ops.h.inc to handle byte-swaps
where necessary, but it does not perform this logic for ELF notes itself.

Fixing that improves matters, but yields other errors: most of the tests
timeout while some generate confusing assertions. Both appear to be related
to the data addresses in those notes, which are incorrect when running on a
big-endian host.

Adding tswap wrappers, which will conditionally swap if the host and target
endianness don't match, fixes that such that check-tcg-x86_64 runs cleanly
on an s390 host.

Acked-by: Pierrick Bouvier <[email protected]>
Signed-off-by: Eric Farman <[email protected]>
---
  hw/i386/x86-common.c     |  6 ++++--
  include/hw/elf_ops.h.inc | 20 ++++++++++++++++++--
  2 files changed, 22 insertions(+), 4 deletions(-)

Hi!

This looks like a good addition for the stable series, if it actually
fixed the issue mentioned.

I'm queuing this change for the stable series, but not picking for any
release just yet, - if a follow-up fix will come, I'll include both.

And please let me know if I shouldn't :)

Thanks,

/mjt

Reply via email to