All S390x-related binaries are buildable without a single use
of the legacy "native endian" API. Unset the transitional
TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid
further uses of the legacy API.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
configs/targets/s390x-linux-user.mak | 1 +
configs/targets/s390x-softmmu.mak | 1 +
2 files changed, 2 insertions(+)
diff --git a/configs/targets/s390x-linux-user.mak b/configs/targets/s390x-linux-user.mak
index 68c2f288724..e3723f5dc54 100644
--- a/configs/targets/s390x-linux-user.mak
+++ b/configs/targets/s390x-linux-user.mak
@@ -4,3 +4,4 @@ TARGET_SYSTBL=syscall.tbl
TARGET_BIG_ENDIAN=y
TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml
TARGET_LONG_BITS=64
+TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y
diff --git a/configs/targets/s390x-softmmu.mak b/configs/targets/s390x-softmmu.mak
index 76dd5de6584..544657cfe2d 100644
--- a/configs/targets/s390x-softmmu.mak
+++ b/configs/targets/s390x-softmmu.mak
@@ -3,3 +3,4 @@ TARGET_BIG_ENDIAN=y
TARGET_KVM_HAVE_GUEST_DEBUG=y
TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml
TARGET_LONG_BITS=64
+TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y
--
2.52.0
On Wed, 2025-12-24 at 17:20 +0100, Philippe Mathieu-Daudé wrote: > All S390x-related binaries are buildable without a single use > of the legacy "native endian" API. Unset the transitional > TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid > further uses of the legacy API. One nit is that this text confuses me, because the code below sets TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API rather than unsetting TARGET_USE_LEGACY_NATIVE_ENDIAN_API. End goal seems the same though. Thanks, Eric > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > configs/targets/s390x-linux-user.mak | 1 + > configs/targets/s390x-softmmu.mak | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/configs/targets/s390x-linux-user.mak b/configs/targets/s390x-linux-user.mak > index 68c2f288724..e3723f5dc54 100644 > --- a/configs/targets/s390x-linux-user.mak > +++ b/configs/targets/s390x-linux-user.mak > @@ -4,3 +4,4 @@ TARGET_SYSTBL=syscall.tbl > TARGET_BIG_ENDIAN=y > TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml > TARGET_LONG_BITS=64 > +TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y > diff --git a/configs/targets/s390x-softmmu.mak b/configs/targets/s390x-softmmu.mak > index 76dd5de6584..544657cfe2d 100644 > --- a/configs/targets/s390x-softmmu.mak > +++ b/configs/targets/s390x-softmmu.mak > @@ -3,3 +3,4 @@ TARGET_BIG_ENDIAN=y > TARGET_KVM_HAVE_GUEST_DEBUG=y > TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml > TARGET_LONG_BITS=64 > +TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y
On 06/01/2026 21.29, Eric Farman wrote: > On Wed, 2025-12-24 at 17:20 +0100, Philippe Mathieu-Daudé wrote: >> All S390x-related binaries are buildable without a single use >> of the legacy "native endian" API. Unset the transitional >> TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid >> further uses of the legacy API. > > One nit is that this text confuses me, because the code below sets > TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API rather than unsetting TARGET_USE_LEGACY_NATIVE_ENDIAN_API. > > End goal seems the same though. By the way, both definitions seem to be completely unused in QEMU currently, so this patch is currently for no real use yet? Unless some more infrastructure gets merged that consumes this setting, I think we should rather not merge this patch yet. I'll queue patches 1-7 for my next pull request. Thomas
On 7/1/26 06:11, Thomas Huth wrote: > On 06/01/2026 21.29, Eric Farman wrote: >> On Wed, 2025-12-24 at 17:20 +0100, Philippe Mathieu-Daudé wrote: >>> All S390x-related binaries are buildable without a single use >>> of the legacy "native endian" API. Unset the transitional >>> TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid >>> further uses of the legacy API. >> >> One nit is that this text confuses me, because the code below sets >> TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API rather than unsetting >> TARGET_USE_LEGACY_NATIVE_ENDIAN_API. Oops, I'll reword. >> End goal seems the same though. > By the way, both definitions seem to be completely unused in QEMU > currently, so this patch is currently for no real use yet? Unless some > more infrastructure gets merged that consumes this setting, I think we > should rather not merge this patch yet. Oh. I usually add 'Based-on' in my cover letters when there are dependencies between series. I did that in the previous version (which was not covering s390x) but Pierrick told me this was not practical to apply and test, and suggested to share a branch/tag with all series; which is what I did (sharing a tag, https://gitlab.com/philmd/qemu/-/tags/endian_s390x-v1), however I failed to precise the other series. In particular, this is based on: https://lore.kernel.org/qemu-devel/20251224152210.87880-1-philmd@linaro.org/ See these patches: system: Allow restricting the legacy ld/st_phys() 'native-endian' API system: Allow restricting the legacy ld/st_he() 'native-endian' API system: Allow restricting legacy address_space_ldst() native-endian API system: Allow restricting the legacy cpu_ld/st() 'native-endian' API system: Allow restricting the legacy translator_ld() 'native-endian' API system: Allow restricting the legacy tswap() 'native-endian' API system: Allow restricting the legacy MO_TE* 'native-endian' definitions system: Allow restricting the legacy DEVICE_NATIVE_ENDIAN definition > I'll queue patches 1-7 for my > next pull request. Thanks!
On Wed, Dec 24, 2025 at 6:21 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > All S390x-related binaries are buildable without a single use > of the legacy "native endian" API. Unset the transitional > TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid > further uses of the legacy API. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> > configs/targets/s390x-linux-user.mak | 1 + > configs/targets/s390x-softmmu.mak | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/configs/targets/s390x-linux-user.mak b/configs/targets/s390x-linux-user.mak > index 68c2f288724..e3723f5dc54 100644 > --- a/configs/targets/s390x-linux-user.mak > +++ b/configs/targets/s390x-linux-user.mak > @@ -4,3 +4,4 @@ TARGET_SYSTBL=syscall.tbl > TARGET_BIG_ENDIAN=y > TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml > TARGET_LONG_BITS=64 > +TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y > diff --git a/configs/targets/s390x-softmmu.mak b/configs/targets/s390x-softmmu.mak > index 76dd5de6584..544657cfe2d 100644 > --- a/configs/targets/s390x-softmmu.mak > +++ b/configs/targets/s390x-softmmu.mak > @@ -3,3 +3,4 @@ TARGET_BIG_ENDIAN=y > TARGET_KVM_HAVE_GUEST_DEBUG=y > TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml > TARGET_LONG_BITS=64 > +TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y > -- > 2.52.0 >
© 2016 - 2026 Red Hat, Inc.