Skip to contentSkip to conversation

configure: deprecate 32 bit build hosts

RFC PATCH In review Alex Bennée 10 participants 23 messages Sep 25, 2019 – Oct 2, 2019

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 configure: deprecate 32 bit build hosts

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Lets mark these machines as deprecated so we can have the wailing and gnashing of teeth now and look to actually dropping the support in a couple of cycles.

Cc Richard Henderson <[email protected]>
---
 configure | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
configure +13 -11
index 542f6aea3f..776fd460b5 100755
@@ -728,7 +728,7 @@ ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
+  ppc64|s390|s390x|sparc64|riscv64)
     supported_cpu="yes"
   ;;
   ppc64le)
@@ -737,7 +737,6 @@ case "$cpu" in
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
-    supported_cpu="yes"
   ;;
   x86_64|amd64)
     cpu="x86_64"
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
   ;;
-  mips*)
+  mips64*)
     cpu="mips"
     supported_cpu="yes"
   ;;
+  mips*)
+    cpu="mips"
+  ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
-    supported_cpu="yes"
+  ;;
+  x32|riscv32)
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -6438,12 +6440,12 @@ if test "$supported_cpu" = "no"; then
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
     echo
     echo "CPU host architecture $cpu support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host CPU in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"
-    echo "us upstream at [email protected]."
+    echo "The QEMU project intends to remove support for all 32 bit host"
+    echo "CPUs in a future release. 64 bit hosts will need a volunteer"
+    echo "to maintain it and to provide a build host for our continuous"
+    echo "integration setup. configure has succeeded and you can continue"
+    echo "to build, but if you care about QEMU on this platform you"
+    echo "should contact us upstream at [email protected]."
 fi
 
 if test "$supported_os" = "no"; then
Signature · 1 line
2.20.1
#1 lore raw
Quoted 45 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Lets mark these machines as deprecated so we can have the wailing and gnashing of teeth now and look to actually dropping the support in a couple of cycles.

Cc Richard Henderson <[email protected]>
---
 configure | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
configure +1 -2
index 542f6aea3f..776fd460b5 100755
@@ -728,7 +728,7 @@ ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
+  ppc64|s390|s390x|sparc64|riscv64)
     supported_cpu="yes"
   ;;
   ppc64le)
@@ -737,7 +737,6 @@ case "$cpu" in
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
-    supported_cpu="yes"
   ;;
   x86_64|amd64)
     cpu="x86_64"

configure case "$cpu" in · line 748

Quoted 4 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"

I think linux-user is quite used in embedded stuff such NAS.

Eventually this public don't need edge QEMU, it might keep using QEMU v5.0.stable until all NAS/embedded devices are 64-bit...

configure case "$cpu" in · line 757

Quoted 12 lines
configure +3 -1
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
   ;;
-  mips*)
+  mips64*)
     cpu="mips"
     supported_cpu="yes"
   ;;
+  mips*)
+    cpu="mips"

Similarly I can imagine linux-user being used on some routers.

configure case "$cpu" in · line 762

Quoted 6 lines
configure +3 -1
+  ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
-    supported_cpu="yes"
+  ;;
+  x32|riscv32)

x32 is borderline :) but yes, pointers are 32-bit.

Quoted 23 lines
configure +6 -6
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -6438,12 +6440,12 @@ if test "$supported_cpu" = "no"; then
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
     echo
     echo "CPU host architecture $cpu support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host CPU in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"
-    echo "us upstream at [email protected]."
+    echo "The QEMU project intends to remove support for all 32 bit host"
+    echo "CPUs in a future release. 64 bit hosts will need a volunteer"
+    echo "to maintain it and to provide a build host for our continuous"
+    echo "integration setup. configure has succeeded and you can continue"
+    echo "to build, but if you care about QEMU on this platform you"
+    echo "should contact us upstream at [email protected]."
 fi
 
 if test "$supported_os" = "no"; then
#2 lore raw
In reply to Alex Bennée
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

configure case "$cpu" in · line 747

Quoted 6 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

thanks
-- PMM

#3 lore raw
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 6 lines
Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

What if the kernel is waiting for QEMU to drop support too ;-P

Quoted 10 lines

configure case "$cpu" in · line 747

Quoted 6 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

RHEL dropped all 32-bit host support a long time ago, so Red Hat don't care for our products.

Fedora has recently stopped building i686 kernels and thus also no long composes i686 installs. Some users complained, but ultimately no one cares enough to step forward as maintainers.

That leaves armv7 as the only 32-bit arch in Fedora that is somewhat active & maintained. I don't have any real insight on whether any armv7 (Fedora) users are making much use of QEMU/KVM though, either system or user emulation.

Our preference in Fedora is to have things built on every architecture that the distro targets, but if upstream developers explicitly drop an architecture we're not going to try to add it back.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#4 lore raw
Quoted 12 lines · Daniel P. Berrangé
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

What if the kernel is waiting for QEMU to drop support too ;-P

For what its worth on kvm/s390 we never cared about implementing 32 bit.

Quoted 31 lines
Quoted 11 lines

configure case "$cpu" in · line 747

Quoted 7 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

RHEL dropped all 32-bit host support a long time ago, so Red Hat don't care for our products.

Fedora has recently stopped building i686 kernels and thus also no long composes i686 installs. Some users complained, but ultimately no one cares enough to step forward as maintainers.

That leaves armv7 as the only 32-bit arch in Fedora that is somewhat active & maintained. I don't have any real insight on whether any armv7 (Fedora) users are making much use of QEMU/KVM though, either system or user emulation.

Our preference in Fedora is to have things built on every architecture that the distro targets, but if upstream developers explicitly drop an architecture we're not going to try to add it back.

Regards,
Daniel

#5 lore raw
Quoted 19 lines · Christian Borntraeger
Quoted 16 lines · Daniel P. Berrangé
Quoted 15 lines · Peter Maydell
Quoted 13 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

For KVM we should wait until the kernel chooses to drop support, I think.

What if the kernel is waiting for QEMU to drop support too ;-P

For what its worth on kvm/s390 we never cared about implementing 32 bit.

Looking at tcg/s390/tcg-target.inc.c :

...
/* We only support generating code for 64-bit mode. */ #if TCG_TARGET_REG_BITS != 64
#error "unsupported code generation mode" #endif
...

... it seems to me that TCG does not support 32-bit on s390 either. I think we can remove s390 (32-bit) from the list completely?

Thomas

#6 lore raw
Quoted 37 lines · Thomas Huth
Quoted 19 lines · Christian Borntraeger
Quoted 16 lines · Daniel P. Berrangé
Quoted 15 lines · Peter Maydell
Quoted 13 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

For KVM we should wait until the kernel chooses to drop support, I think.

What if the kernel is waiting for QEMU to drop support too ;-P

For what its worth on kvm/s390 we never cared about implementing 32 bit.

Looking at tcg/s390/tcg-target.inc.c :

...
/* We only support generating code for 64-bit mode. */ #if TCG_TARGET_REG_BITS != 64
#error "unsupported code generation mode" #endif
...

Quoted 2 lines

... it seems to me that TCG does not support 32-bit on s390 either. I think we can remove s390 (32-bit) from the list completely?

It's the same for riscv32 I think.

Quoted 2 lines

Thomas

--
Alex Bennée

#7 lore raw
Quoted 41 lines · Alex Bennée
Quoted 37 lines · Thomas Huth
Quoted 19 lines · Christian Borntraeger
Quoted 16 lines · Daniel P. Berrangé
Quoted 15 lines · Peter Maydell
Quoted 13 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

For KVM we should wait until the kernel chooses to drop support, I think.

What if the kernel is waiting for QEMU to drop support too ;-P

For what its worth on kvm/s390 we never cared about implementing 32 bit.

Looking at tcg/s390/tcg-target.inc.c :

...
/* We only support generating code for 64-bit mode. */ #if TCG_TARGET_REG_BITS != 64
#error "unsupported code generation mode" #endif
...

Quoted 4 lines
Quoted 2 lines

... it seems to me that TCG does not support 32-bit on s390 either. I think we can remove s390 (32-bit) from the list completely?

It's the same for riscv32 I think.

I think riscv32 host *should* work, although I don't think it was ever tested.

Considering that we have enough trouble keeping the riscv32 kernel booting it's probably ok to drop it from QEMU.

Alistair

Quoted 8 lines
Quoted 3 lines

Thomas

--
Alex Bennée

#8 lore raw
Quoted 42 lines · Alistair Francis
Quoted 41 lines · Alex Bennée
Quoted 37 lines · Thomas Huth
Quoted 19 lines · Christian Borntraeger
Quoted 16 lines · Daniel P. Berrangé
Quoted 15 lines · Peter Maydell
Quoted 13 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

For KVM we should wait until the kernel chooses to drop support, I think.

What if the kernel is waiting for QEMU to drop support too ;-P

For what its worth on kvm/s390 we never cared about implementing 32 bit.

Looking at tcg/s390/tcg-target.inc.c :

...
/* We only support generating code for 64-bit mode. */ #if TCG_TARGET_REG_BITS != 64
#error "unsupported code generation mode" #endif
...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

... it seems to me that TCG does not support 32-bit on s390 either. I think we can remove s390 (32-bit) from the list completely?

It's the same for riscv32 I think.

I think riscv32 host *should* work, although I don't think it was ever tested.

You certainly don't support oversized guests:

  /* We don't support oversize guests */
  QEMU_BUILD_BUG_ON(TCG_TARGET_REG_BITS < TARGET_LONG_BITS);
Quoted 14 lines

Considering that we have enough trouble keeping the riscv32 kernel booting it's probably ok to drop it from QEMU.

Alistair

Quoted 8 lines
Quoted 3 lines

Thomas

--
Alex Bennée

--
Alex Bennée

#9 lore raw
In reply to Daniel P. Berrangé

Hi,

Quoted 4 lines

That leaves armv7 as the only 32-bit arch in Fedora that is somewhat active & maintained. I don't have any real insight on whether any armv7 (Fedora) users are making much use of QEMU/KVM though, either system or user emulation.

Played with system emulation a while back. I doubt this is used much in practice. It's very slow for various reasons (no gic, no armv8 arch updates to support kvm virt better, slow sdcard/usb I/O). TCG on a beefy x86 box is roughly the same speed. Also 1G of memory isn't that much even without considering virtual machines.

The rpi4 with 4G (disclaimer: don't have one) probably works better. But note they are finally working on a 64bit kernel for raspbian, which I expect is only a first step for better 64bit support.

cheers,
Gerd

#10 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 6 lines
Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

I can certainly do that - although I'd still like to know who actually uses 32 bit kvm support these days.

Quoted 11 lines

configure case "$cpu" in · line 747

Quoted 7 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

raspi is probably the most common one because of the 32 bit userspace they use even though they are running on 64 bit chips.

Quoted 4 lines

thanks
-- PMM

--
Alex Bennée

#11 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 6 lines
Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

Agreed. I think this discussion should be more about TCG.

Quoted 10 lines

configure case "$cpu" in · line 747

Quoted 6 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

I'd really like to know what raspi users might be using qemu for. Depending on that answer, perhaps it would be sufficient for arm32 tcg to only support 32-bit guests.

For context, the discussion that Alex and I were having was about int128_t, and how to support that directly in tcg (especially to/from helpers), and how that might be vastly easier if we didn't have to consider 32-bit hosts.

r~

#12 lore raw
Quoted 32 lines · Richard Henderson
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 6 lines
Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

Agreed. I think this discussion should be more about TCG.

Quoted 10 lines

configure case "$cpu" in · line 747

Quoted 6 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

Quoted 3 lines

I'd really like to know what raspi users might be using qemu for. Depending on that answer, perhaps it would be sufficient for arm32 tcg to only support 32-bit guests.

I asked on the Fedora development lists for feedback on the idea of dropping QEMU 32-bit host support

https://lists.fedoraproject.org/archives/list/[email protected]/thread/TPAVIC6YANGP2NK4RUOP7OCIOIFIOV3A/

The response was rather underwhealming to say the least, with only one person explicitly expressing a desire for QEMU to keep 32-bit host support for armv7l.

The main interesting thing I learnt was that even with 64-bit Raspberry Pi hardware, it can be desirable to run 32-bit Raspberry Pi supporting distro, supposedly for performance benefits.

Quoted 3 lines

For context, the discussion that Alex and I were having was about int128_t, and how to support that directly in tcg (especially to/from helpers), and how that might be vastly easier if we didn't have to consider 32-bit hosts.

I know nothing about TCG internals, but Is it viable to implement int128_t support only in 64-bit host, leaving 32-bit hosts without it ? Or is this really a blocking item that is holding back 64-bit host features.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#13 lore raw
Quoted 42 lines · Daniel P. Berrangé
Quoted 32 lines · Richard Henderson
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

Quoted 6 lines
Quoted 3 lines

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

For KVM we should wait until the kernel chooses to drop support, I think.

Agreed. I think this discussion should be more about TCG.

Quoted 10 lines

configure case "$cpu" in · line 747

Quoted 6 lines
configure +0 -1
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;

I'll leave others to voice opinions about their architectures, but I still have 32-bit arm in my test set for builds, and I'm pretty sure we have users (raspi users, for a start).

Quoted 3 lines

I'd really like to know what raspi users might be using qemu for. Depending on that answer, perhaps it would be sufficient for arm32 tcg to only support 32-bit guests.

I asked on the Fedora development lists for feedback on the idea of dropping QEMU 32-bit host support

https://lists.fedoraproject.org/archives/list/[email protected]/thread/TPAVIC6YANGP2NK4RUOP7OCIOIFIOV3A/

Quoted 7 lines

The response was rather underwhealming to say the least, with only one person explicitly expressing a desire for QEMU to keep 32-bit host support for armv7l.

The main interesting thing I learnt was that even with 64-bit Raspberry Pi hardware, it can be desirable to run 32-bit Raspberry Pi supporting distro, supposedly for performance benefits.

I'd like to see actual numbers for that claim but certainly I know the foundation has been keen to keep the same 32bit userspace for the "official" distros since the Pi 1/2 era. AIUI other distros are available which make full use of the 64 bit CPUs in Pi3+ devices.

Quoted 7 lines
Quoted 3 lines

For context, the discussion that Alex and I were having was about int128_t, and how to support that directly in tcg (especially to/from helpers), and how that might be vastly easier if we didn't have to consider 32-bit hosts.

I know nothing about TCG internals, but Is it viable to implement int128_t support only in 64-bit host, leaving 32-bit hosts without it ? Or is this really a blocking item that is holding back 64-bit host features.

It's not a blocking item but it's an attempt to manage complexity - we currently support 64 bit guests on 32 bit hosts but have to disable things like MTTCG because we can't do guest atomic accesses. Some of the backends currently do not support these "oversized" guests at all so we are already seeing some fragmentation.

The int128 support is due to the fact we are going to start to see newer architectures with things like 128 bit shadow capability registers and they will be a pain to shuffle around in 32 bit generated host code as well as requiring writing new extra plumbing for TCG's pre/post amble to pass them back and forth between C and generated code. These guest architectures may not even be full 64 bit guests so it's not quite as simple as saying you can't have 64 bit guests on a 32 bit host.

So if lots of people still want 32 bit host support for TCG guests we can probably come up with something that keeps existing functionality ticking over while leaving the newer architectural features to 64 bit hosts only. However if those users are better served by using an older release of QEMU we could dump a fair bit of cruft going forward.

Quoted 3 lines

Regards,
Daniel

--
Alex Bennée

#14 lore raw
Quoted 4 lines · Alex Bennée

So if lots of people still want 32 bit host support for TCG guests we can probably come up with something that keeps existing functionality ticking over while leaving the newer architectural features to 64 bit hosts only.

I don't think we should do that -- QEMU should offer the same (emulated) functionality regardless of host.

thanks
-- PMM

#15 lore raw
In reply to Alex Bennée
Quoted 7 lines · Alex Bennée

The int128 support is due to the fact we are going to start to see newer architectures with things like 128 bit shadow capability registers and they will be a pain to shuffle around in 32 bit generated host code as well as requiring writing new extra plumbing for TCG's pre/post amble to pass them back and forth between C and generated code. These guest architectures may not even be full 64 bit guests so it's not quite as simple as saying you can't have 64 bit guests on a 32 bit host.

I think that for int128_t in particular, the ideal answer is that if the compiler developers want to introduce a new abstraction like that, they should support it on all targets, not just half of them...

thanks
-- PMM

#16 lore raw
Quoted 9 lines · Peter Maydell
Quoted 7 lines · Alex Bennée

The int128 support is due to the fact we are going to start to see newer architectures with things like 128 bit shadow capability registers and they will be a pain to shuffle around in 32 bit generated host code as well as requiring writing new extra plumbing for TCG's pre/post amble to pass them back and forth between C and generated code. These guest architectures may not even be full 64 bit guests so it's not quite as simple as saying you can't have 64 bit guests on a 32 bit host.

Quoted 4 lines

I think that for int128_t in particular, the ideal answer is that if the compiler developers want to introduce a new abstraction like that, they should support it on all targets, not just half of them...

Just out of interest, which host/compiler combinations don't currently implement int128_t?

ATB,

Mark.

#17 lore raw
Quoted 2 lines · Mark Cave-Ayland

Just out of interest, which host/compiler combinations don't currently implement int128_t?

GCC only implements int128_t for 64-bit targets.

r~

#18 lore raw
Quoted 5 lines · Richard Henderson
Quoted 2 lines · Mark Cave-Ayland

Just out of interest, which host/compiler combinations don't currently implement int128_t?

GCC only implements int128_t for 64-bit targets.

QEMU probes for that during configure and sets CONFIG_INT128

If I'm reading correctly include/qemu/int128.h then provides a fallback type based on a struct with two int64s.

This has some inconvenience though as you have to use the the (inline) function calls for all the basic operands and will be less efficient when using the fallback.

Presumably this is not viable for TCG ?

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#19 lore raw
Quoted 4 lines · Daniel P. Berrangé
Quoted 1 line

GCC only implements int128_t for 64-bit targets.

QEMU probes for that during configure and sets CONFIG_INT128

Quoted 8 lines

If I'm reading correctly include/qemu/int128.h then provides a fallback type based on a struct with two int64s.

This has some inconvenience though as you have to use the the (inline) function calls for all the basic operands and will be less efficient when using the fallback.

Presumably this is not viable for TCG ?

A structure (for some ABIs) may be passed and returned by invisible reference.
It's not impossible (nothing's impossible), but it adds previously unnecessary
complexity to allocate that storage on the jit stack.

Actually manipulating one 128-bit value consumes 4/6 of the i386 registers, which I can well imagine could wind up causing problems. Certainly manipulating two values at once is out of the question. That's less of a problem for arm and mips.

Anyway, all of the pain points go away if we assume 64-bit.

r~

#20 lore raw
In reply to Alex Bennée
Quoted 28 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Lets mark these machines as deprecated so we can have the wailing and gnashing of teeth now and look to actually dropping the support in a couple of cycles.

Cc Richard Henderson <[email protected]>
---
 configure | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
configure +0 -0
index 542f6aea3f..776fd460b5 100755

configure ARCH= · line 731

Quoted 5 lines
configure +1 -1
@@ -728,7 +728,7 @@ ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
+  ppc64|s390|s390x|sparc64|riscv64)

I think you can also remove "s390". "s390" is the 32-bit variant, "s390x" is the 64-bit variant.

Quoted 24 lines
configure +1 -3
     supported_cpu="yes"
   ;;
   ppc64le)
@@ -737,7 +737,6 @@ case "$cpu" in
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
-    supported_cpu="yes"
   ;;
   x86_64|amd64)
     cpu="x86_64"
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
   ;;
-  mips*)
+  mips64*)
     cpu="mips"

configure case "$cpu" in · line 762

Quoted 10 lines
configure +5 -1
     supported_cpu="yes"
   ;;
+  mips*)
+    cpu="mips"
+  ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
-    supported_cpu="yes"
+  ;;
+  x32|riscv32)

You forgot to add "ppc" (and "s390") here.

Quoted 12 lines
configure +0 -5
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -6438,12 +6440,12 @@ if test "$supported_cpu" = "no"; then
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
     echo
     echo "CPU host architecture $cpu support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host CPU in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"

configure if test "$supported_cpu" = "no"; then · line 6451

Quoted 10 lines
configure +6 -1
-    echo "us upstream at [email protected]."
+    echo "The QEMU project intends to remove support for all 32 bit host"
+    echo "CPUs in a future release. 64 bit hosts will need a volunteer"
+    echo "to maintain it and to provide a build host for our continuous"
+    echo "integration setup. configure has succeeded and you can continue"
+    echo "to build, but if you care about QEMU on this platform you"
+    echo "should contact us upstream at [email protected]."
 fi
 
 if test "$supported_os" = "no"; then

In case this gets accepted, we also might want to deprecate the qemu-system-i386, qemu-system-arm and qemu-system-ppc targets, since they are AFAIK just a subset of qemu-system-x86_64, qemu-system-aarch64 and qemu-system-ppc64. But that's likely something for a later patch, I think.

Thomas

#21 lore raw
Quoted 96 lines · Thomas Huth
Quoted 28 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Lets mark these machines as deprecated so we can have the wailing and gnashing of teeth now and look to actually dropping the support in a couple of cycles.

Cc Richard Henderson <[email protected]>
---
 configure | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
configure +0 -0
index 542f6aea3f..776fd460b5 100755

configure ARCH= · line 731

Quoted 5 lines
configure +1 -1
@@ -728,7 +728,7 @@ ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
+  ppc64|s390|s390x|sparc64|riscv64)

I think you can also remove "s390". "s390" is the 32-bit variant, "s390x" is the 64-bit variant.

Quoted 24 lines
configure +1 -3
     supported_cpu="yes"
   ;;
   ppc64le)
@@ -737,7 +737,6 @@ case "$cpu" in
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
-    supported_cpu="yes"
   ;;
   x86_64|amd64)
     cpu="x86_64"
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
   ;;
-  mips*)
+  mips64*)
     cpu="mips"

configure case "$cpu" in · line 762

Quoted 10 lines
configure +5 -1
     supported_cpu="yes"
   ;;
+  mips*)
+    cpu="mips"
+  ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
-    supported_cpu="yes"
+  ;;
+  x32|riscv32)

You forgot to add "ppc" (and "s390") here.

Quoted 21 lines
configure +6 -6
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -6438,12 +6440,12 @@ if test "$supported_cpu" = "no"; then
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
     echo
     echo "CPU host architecture $cpu support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host CPU in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"
-    echo "us upstream at [email protected]."
+    echo "The QEMU project intends to remove support for all 32 bit host"
+    echo "CPUs in a future release. 64 bit hosts will need a volunteer"
+    echo "to maintain it and to provide a build host for our continuous"
+    echo "integration setup. configure has succeeded and you can continue"
+    echo "to build, but if you care about QEMU on this platform you"
+    echo "should contact us upstream at [email protected]."
 fi
 
Quoted 7 lines

configure if test "$supported_cpu" = "no"; then · line 6451

Quoted 1 line
configure +0 -0
 if test "$supported_os" = "no"; then

In case this gets accepted, we also might want to deprecate the qemu-system-i386, qemu-system-arm and qemu-system-ppc targets, since they are AFAIK just a subset of qemu-system-x86_64, qemu-system-aarch64 and qemu-system-ppc64. But that's likely something for a later patch, I think.

Yes this is purely for the host side. I'm not intending to deprecate any guest support.

Quoted 2 lines

Thomas

--
Alex Bennée

#22 lore raw
In reply to Alex Bennée
Quoted 79 lines · Alex Bennée

The 32 bit hosts are already a second class citizen especially with support for running 64 bit guests under TCG. We are also limited by testing as actual working 32 bit machines are getting quite rare in developers personal menageries. For TCG supporting newer types like Int128 is a lot harder with 32 bit calling conventions compared to their larger bit sized cousins. Fundamentally address space is the most useful thing for the translator to have even for a 32 bit guest a 32 bit host is quite constrained.

As far as I'm aware 32 bit KVM users are even less numerous. Even ILP32 doesn't make much sense given the address space QEMU needs to manage.

Lets mark these machines as deprecated so we can have the wailing and gnashing of teeth now and look to actually dropping the support in a couple of cycles.

Cc Richard Henderson <[email protected]>
---
 configure | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
configure +7 -10
index 542f6aea3f..776fd460b5 100755
@@ -728,7 +728,7 @@ ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
+  ppc64|s390|s390x|sparc64|riscv64)
     supported_cpu="yes"
   ;;
   ppc64le)
@@ -737,7 +737,6 @@ case "$cpu" in
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
-    supported_cpu="yes"
   ;;
   x86_64|amd64)
     cpu="x86_64"
@@ -745,19 +744,22 @@ case "$cpu" in
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
   ;;
-  mips*)
+  mips64*)
     cpu="mips"
     supported_cpu="yes"
   ;;
+  mips*)
+    cpu="mips"
+  ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
-    supported_cpu="yes"
+  ;;
+  x32|riscv32)
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -6438,12 +6440,12 @@ if test "$supported_cpu" = "no"; then
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
     echo
     echo "CPU host architecture $cpu support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host CPU in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"

configure if test "$supported_cpu" = "no"; then · line 6451

Quoted 10 lines
configure +6 -1
-    echo "us upstream at [email protected]."
+    echo "The QEMU project intends to remove support for all 32 bit host"
+    echo "CPUs in a future release. 64 bit hosts will need a volunteer"
+    echo "to maintain it and to provide a build host for our continuous"
+    echo "integration setup. configure has succeeded and you can continue"
+    echo "to build, but if you care about QEMU on this platform you"
+    echo "should contact us upstream at [email protected]."
 fi
 
 if test "$supported_os" = "no"; then

FWIW I still use my Mac Mini G4 (with KVM) to help debug bits of TCG for qemu-system-ppc and so I would certainly miss this for bits of my Mac work.

Is it possible to reach a compromise based on host/target i.e. allow 32-bit hosts to only run targets up to 32-bits? I'd only ever want to use qemu-system-ppc on the Mac Mini for testing: for qemu-system-ppc64 it is clearly much quicker just to use the nearest x86 box.

ATB,

Mark.