All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts
@ 2016-08-09 15:55 Alex Bennée
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests Alex Bennée
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Alex Bennée @ 2016-08-09 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, rth, Alex Bennée

Hi,

I'm proposing for the 2.8 cycle we officially drop supporting 64 bit
guests on 32 bit hosts. For most of the KVM targets it doesn't make
any sense anyway and for TCG it makes things harder (e.g. supporting
64 bit atomics on a 32 bit platform). I'm not actually convinced
things actually work if built or that anyone relies on these
combinations. Consider these patches a way of flushing any such users
out ;-)

Alex Bennée (3):
  configure: check CPU width and disable larger guests
  configure: filter 64 bit machines on 32 bit builds
  cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS

 configure               | 50 +++++++++++++++++++++++++++++++++++++++++++++++--
 include/exec/cpu-defs.h |  9 +++++++++
 2 files changed, 57 insertions(+), 2 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests
  2016-08-09 15:55 [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Alex Bennée
@ 2016-08-09 15:55 ` Alex Bennée
  2016-08-09 16:13   ` Peter Maydell
  2016-08-09 18:06   ` Richard Henderson
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds Alex Bennée
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Alex Bennée @ 2016-08-09 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, rth, Alex Bennée

Emulating 64 bit guests on a 32 bit host is either impossible with KVM
or needs a lot of special casing for TCG targets. As 64 bit hosts are
fairly normal nowadays and there can't be many people trying this
combination lets disable it completely.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index f57fcc6..7b779c1 100755
--- a/configure
+++ b/configure
@@ -478,6 +478,7 @@ elif check_define __x86_64__ ; then
     cpu="x32"
   else
     cpu="x86_64"
+    cpu_width=64
   fi
 elif check_define __sparc__ ; then
   if check_define __arch64__ ; then
@@ -515,26 +516,36 @@ ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ia64|ppc|ppc64|s390|s390x|sparc64|x32)
+  ppc|s390|x32)
     cpu="$cpu"
+    cpu_width=32
+  ;;
+  ia64|ppc64|s390x|sparc64)
+    cpu="$cpu"
+    cpu_width=64
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
+    cpu_width=32
   ;;
   x86_64|amd64)
     cpu="x86_64"
+    cpu_width=64
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
+    cpu_width=32
   ;;
   aarch64)
     cpu="aarch64"
+    cpu_width=32
   ;;
   mips*)
     cpu="mips"
   ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
+    cpu_width=32
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -1700,6 +1711,26 @@ else
 fi
 
 ##########################################
+# host address width checks
+too_wide_targets=""
+
+if test "$cpu_width" = "32"; then
+    for target in $target_list; do
+        target_name=$(echo $target | cut -d '-' -f 1)
+        case "$target_name" in
+            aarch64|mips64|ppc64|s390x|sparc64)
+                too_wide_targets="$too_wide_targets $target"
+                ;;
+        esac
+    done
+fi
+
+if test ! -z "$too_wide_targets" ; then
+    error_exit "Support for the following targets can't be built on 32 bit systems:\n\t$too_wide_targets"
+fi
+
+
+##########################################
 # cocoa implies not SDL or GTK
 # (the cocoa UI code currently assumes it is always the active UI
 # and doesn't interact well with other UI frontend code)
@@ -4795,6 +4826,7 @@ if test "$slirp" = "yes" ; then
 fi
 echo "module support    $modules"
 echo "host CPU          $cpu"
+echo "host CPU width    $cpu_width"
 echo "host big endian   $bigendian"
 echo "target list       $target_list"
 echo "tcg debug enabled $debug_tcg"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds
  2016-08-09 15:55 [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Alex Bennée
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests Alex Bennée
@ 2016-08-09 15:55 ` Alex Bennée
  2016-08-09 16:15   ` Peter Maydell
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 3/3] cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS Alex Bennée
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Alex Bennée @ 2016-08-09 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, rth, Alex Bennée

If the user doesn't specify any targets we build a default_target_list
from the target .mak fragements. If we don't filter out the 64 bit
targets when building on 32 bit machines we'll error out later on.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 7b779c1..5499dbc 100755
--- a/configure
+++ b/configure
@@ -1252,7 +1252,21 @@ if [ "$bsd_user" = "yes" ]; then
 fi
 
 for config in $mak_wilds; do
-    default_target_list="${default_target_list} $(basename "$config" .mak)"
+
+    target=$(basename "$config" .mak)
+
+    if test "$cpu_width" = "32"; then
+        case $target in
+            *64*|s390x-*)
+                # skip 64 bit machines
+                ;;
+            *)
+                default_target_list="${default_target_list} ${target}"
+                ;;
+        esac
+    else
+        default_target_list="${default_target_list} ${target}"
+    fi
 done
 
 if test x"$show_help" = x"yes" ; then
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [RFC for 2.8 3/3] cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS
  2016-08-09 15:55 [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Alex Bennée
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests Alex Bennée
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds Alex Bennée
@ 2016-08-09 15:55 ` Alex Bennée
  2016-08-10  9:25   ` Gerd Hoffmann
  2016-08-24 12:23 ` [Qemu-devel] " Alex Bennée
  4 siblings, 0 replies; 14+ messages in thread
From: Alex Bennée @ 2016-08-09 15:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, rth, Alex Bennée, Paolo Bonzini, Peter Crosthwaite

This shouldn't trigger as the configure check ensures we don't build any
unsupported combinations. However we make the explicit check in
cpu-defs to catch any new ones being introduced.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/exec/cpu-defs.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 5f4e303..499e1a8 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -54,6 +54,15 @@ typedef uint64_t target_ulong;
 #error TARGET_LONG_SIZE undefined
 #endif
 
+/* Supporting 64 bit vCPUs on 32 bit hosts is getting increasingly
+ * complicated so we no longer do it. The configure script should have
+ * prevented such a configuration being built but we double check
+ * here.
+ */
+#if HOST_LONG_BITS < TARGET_LONG_BITS
+#error wide-on-narrow CPU emulation is no longer supported
+#endif
+
 #if !defined(CONFIG_USER_ONLY)
 /* use a fully associative victim tlb of 8 entries */
 #define CPU_VTLB_SIZE 8
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests Alex Bennée
@ 2016-08-09 16:13   ` Peter Maydell
  2016-08-09 18:06   ` Richard Henderson
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2016-08-09 16:13 UTC (permalink / raw)
  To: Alex Bennée; +Cc: QEMU Developers, Richard Henderson

On 9 August 2016 at 16:55, Alex Bennée <alex.bennee@linaro.org> wrote:
> Emulating 64 bit guests on a 32 bit host is either impossible with KVM
> or needs a lot of special casing for TCG targets. As 64 bit hosts are
> fairly normal nowadays and there can't be many people trying this
> combination lets disable it completely.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 34 +++++++++++++++++++++++++++++++++-
>  1 file changed, 33 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index f57fcc6..7b779c1 100755
> --- a/configure
> +++ b/configure
> @@ -478,6 +478,7 @@ elif check_define __x86_64__ ; then
>      cpu="x32"
>    else
>      cpu="x86_64"
> +    cpu_width=64
>    fi
>  elif check_define __sparc__ ; then
>    if check_define __arch64__ ; then
> @@ -515,26 +516,36 @@ ARCH=
>  # Normalise host CPU name and set ARCH.
>  # Note that this case should only have supported host CPUs, not guests.
>  case "$cpu" in
> -  ia64|ppc|ppc64|s390|s390x|sparc64|x32)
> +  ppc|s390|x32)
>      cpu="$cpu"
> +    cpu_width=32
> +  ;;
> +  ia64|ppc64|s390x|sparc64)
> +    cpu="$cpu"
> +    cpu_width=64

We can detect the host pointer width generically at configure time,
in a similar way to how we detect its endianness:

cat > $TMPC << EOF
#include <inttypes.h>

uintptr_t be[] = { (uintptr_t)0x4c6f4e674c6f4e67ULL };
uintptr_t le[] = { (uintptr_t)0x674e6f4c674e6f4cULL };
extern int foo(uintptr_t *a, uintptr_t *b);

int main(void) {
    return foo(le, be);
}
EOF
if compile_object; then
    if grep -q LoNgLoNg $TMPO; then
        hostwidth=64
    elif grep -q LoNg $TMPO; then
        hostwidth=32
    else
        error_exit "Host pointer width detection failed"
    fi
else
    error_exit "Host pointer width detection failed"
fi

(I've tested the C code here but not the shell-scriptery.)


>  ##########################################
> +# host address width checks
> +too_wide_targets=""
> +
> +if test "$cpu_width" = "32"; then
> +    for target in $target_list; do
> +        target_name=$(echo $target | cut -d '-' -f 1)
> +        case "$target_name" in
> +            aarch64|mips64|ppc64|s390x|sparc64)

We should find a way to avoid having to specify the guest
CPU's pointer width twice (once here and once by setting
TARGET_LONG_BITS in its cpu.h). Otherwise people are going
to forget to update this list for new CPUs.

> +                too_wide_targets="$too_wide_targets $target"
> +                ;;
> +        esac
> +    done
> +fi
> +
> +if test ! -z "$too_wide_targets" ; then
> +    error_exit "Support for the following targets can't be built on 32 bit systems:\n\t$too_wide_targets"
> +fi

Won't this break running configure on a 32-bit host with
no target-list specified at all?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds Alex Bennée
@ 2016-08-09 16:15   ` Peter Maydell
  2016-08-09 19:08     ` Alex Bennée
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2016-08-09 16:15 UTC (permalink / raw)
  To: Alex Bennée; +Cc: QEMU Developers, Richard Henderson

On 9 August 2016 at 16:55, Alex Bennée <alex.bennee@linaro.org> wrote:
> If the user doesn't specify any targets we build a default_target_list
> from the target .mak fragements. If we don't filter out the 64 bit
> targets when building on 32 bit machines we'll error out later on.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 7b779c1..5499dbc 100755
> --- a/configure
> +++ b/configure
> @@ -1252,7 +1252,21 @@ if [ "$bsd_user" = "yes" ]; then
>  fi
>
>  for config in $mak_wilds; do
> -    default_target_list="${default_target_list} $(basename "$config" .mak)"
> +
> +    target=$(basename "$config" .mak)
> +
> +    if test "$cpu_width" = "32"; then
> +        case $target in
> +            *64*|s390x-*)
> +                # skip 64 bit machines
> +                ;;
> +            *)
> +                default_target_list="${default_target_list} ${target}"
> +                ;;
> +        esac
> +    else
> +        default_target_list="${default_target_list} ${target}"
> +    fi
>  done

Ah, this is where the default target list gets updated.
You need to squash this into patch 1 or you break bisection
on 32-bit hosts.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests Alex Bennée
  2016-08-09 16:13   ` Peter Maydell
@ 2016-08-09 18:06   ` Richard Henderson
  1 sibling, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2016-08-09 18:06 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: peter.maydell

On 08/09/2016 09:25 PM, Alex Bennée wrote:
> -  ia64|ppc|ppc64|s390|s390x|sparc64|x32)
> +  ppc|s390|x32)
>      cpu="$cpu"
> +    cpu_width=32
> +  ;;
> +  ia64|ppc64|s390x|sparc64)
> +    cpu="$cpu"
> +    cpu_width=64
>    ;;
>    i386|i486|i586|i686|i86pc|BePC)
>      cpu="i386"
> +    cpu_width=32
>    ;;
>    x86_64|amd64)
>      cpu="x86_64"
> +    cpu_width=64
>    ;;
>    armv*b|armv*l|arm)
>      cpu="arm"
> +    cpu_width=32
>    ;;
>    aarch64)
>      cpu="aarch64"
> +    cpu_width=32
>    ;;
>    mips*)
>      cpu="mips"
>    ;;
>    sparc|sun4[cdmuv])
>      cpu="sparc"
> +    cpu_width=32

Note that x32 and sparc are both 64-bit hosts with 32-bit pointers (we don't 
support sparcv8 as a host anymore, just sparcv8+, aka sparcv9 in a 32-bit context).

Not that I believe these to be interesting hosts, since VMA space is half the 
battle when it comes to emulation.


r~

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds
  2016-08-09 16:15   ` Peter Maydell
@ 2016-08-09 19:08     ` Alex Bennée
  2016-08-09 19:11       ` Peter Maydell
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Bennée @ 2016-08-09 19:08 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Richard Henderson

Squash or move to the position before?

On 9 August 2016 at 17:15, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 9 August 2016 at 16:55, Alex Bennée <alex.bennee@linaro.org> wrote:
>> If the user doesn't specify any targets we build a default_target_list
>> from the target .mak fragements. If we don't filter out the 64 bit
>> targets when building on 32 bit machines we'll error out later on.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  configure | 16 +++++++++++++++-
>>  1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 7b779c1..5499dbc 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1252,7 +1252,21 @@ if [ "$bsd_user" = "yes" ]; then
>>  fi
>>
>>  for config in $mak_wilds; do
>> -    default_target_list="${default_target_list} $(basename "$config" .mak)"
>> +
>> +    target=$(basename "$config" .mak)
>> +
>> +    if test "$cpu_width" = "32"; then
>> +        case $target in
>> +            *64*|s390x-*)
>> +                # skip 64 bit machines
>> +                ;;
>> +            *)
>> +                default_target_list="${default_target_list} ${target}"
>> +                ;;
>> +        esac
>> +    else
>> +        default_target_list="${default_target_list} ${target}"
>> +    fi
>>  done
>
> Ah, this is where the default target list gets updated.
> You need to squash this into patch 1 or you break bisection
> on 32-bit hosts.
>
> thanks
> -- PMM



-- 
Alex Bennée
KVM/QEMU Hacker for Linaro

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds
  2016-08-09 19:08     ` Alex Bennée
@ 2016-08-09 19:11       ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2016-08-09 19:11 UTC (permalink / raw)
  To: Alex Bennée; +Cc: QEMU Developers, Richard Henderson

On 9 August 2016 at 20:08, Alex Bennée <alex.bennee@linaro.org> wrote:
> Squash or move to the position before?

There's not much code here and in any case it assumes
the existence of variables only set in the previous
patch, so I'd just squash.

PS:

>>> +    if test "$cpu_width" = "32"; then
>>> +        case $target in
>>> +            *64*|s390x-*)
>>> +                # skip 64 bit machines

...this is adding another place that's listing all 64-bit
targets and which would need to be changed if we add another
64-bit target in future.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts
  2016-08-09 15:55 [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Alex Bennée
@ 2016-08-10  9:25   ` Gerd Hoffmann
  2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds Alex Bennée
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2016-08-10  9:25 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel, peter.maydell, rth, xen-devel

On Di, 2016-08-09 at 16:55 +0100, Alex Bennée wrote:
> Hi,
> 
> I'm proposing for the 2.8 cycle we officially drop supporting 64 bit
> guests on 32 bit hosts. For most of the KVM targets it doesn't make
> any sense anyway and for TCG it makes things harder (e.g. supporting
> 64 bit atomics on a 32 bit platform). I'm not actually convinced
> things actually work if built or that anyone relies on these
> combinations. Consider these patches a way of flushing any such users
> out ;-)

Adding xen-devel to Cc.

64bit xen hypervisor with 32bit dom0 running 32bit qemu, providing
device emulation for 64bit dumUs at least used to be a common setup
years ago.  I have my doubts this is still the case in recent xen
versions, but I guess we better ask the Xen guys ...

Can anyone clarify?

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts
@ 2016-08-10  9:25   ` Gerd Hoffmann
  0 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2016-08-10  9:25 UTC (permalink / raw)
  To: Alex Bennée; +Cc: peter.maydell, xen-devel, qemu-devel, rth

On Di, 2016-08-09 at 16:55 +0100, Alex Bennée wrote:
> Hi,
> 
> I'm proposing for the 2.8 cycle we officially drop supporting 64 bit
> guests on 32 bit hosts. For most of the KVM targets it doesn't make
> any sense anyway and for TCG it makes things harder (e.g. supporting
> 64 bit atomics on a 32 bit platform). I'm not actually convinced
> things actually work if built or that anyone relies on these
> combinations. Consider these patches a way of flushing any such users
> out ;-)

Adding xen-devel to Cc.

64bit xen hypervisor with 32bit dom0 running 32bit qemu, providing
device emulation for 64bit dumUs at least used to be a common setup
years ago.  I have my doubts this is still the case in recent xen
versions, but I guess we better ask the Xen guys ...

Can anyone clarify?

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [Xen-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts
  2016-08-10  9:25   ` Gerd Hoffmann
@ 2016-08-15 17:46     ` Stefano Stabellini
  -1 siblings, 0 replies; 14+ messages in thread
From: Stefano Stabellini @ 2016-08-15 17:46 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Alex Bennée, peter.maydell, xen-devel, qemu-devel, rth,
	anthony.perard

On Wed, 10 Aug 2016, Gerd Hoffmann wrote:
> On Di, 2016-08-09 at 16:55 +0100, Alex Bennée wrote:
> > Hi,
> > 
> > I'm proposing for the 2.8 cycle we officially drop supporting 64 bit
> > guests on 32 bit hosts. For most of the KVM targets it doesn't make
> > any sense anyway and for TCG it makes things harder (e.g. supporting
> > 64 bit atomics on a 32 bit platform). I'm not actually convinced
> > things actually work if built or that anyone relies on these
> > combinations. Consider these patches a way of flushing any such users
> > out ;-)
> 
> Adding xen-devel to Cc.
> 
> 64bit xen hypervisor with 32bit dom0 running 32bit qemu, providing
> device emulation for 64bit dumUs at least used to be a common setup
> years ago.  I have my doubts this is still the case in recent xen
> versions, but I guess we better ask the Xen guys ...
> 
> Can anyone clarify?

Hi Gerd, thanks for CC'ing xen-devel on this.

Although 32bit Dom0 deployments are not as common as they used to be,
they are still certainly a valid scenario. However for them to work,
QEMU doesn't really need to support TCG 32bit on 64bit. QEMU when used
with Xen as accelerator doesn't actually do any CPU emulation; there was
even a proposal to remove the CPU emulation completely from Xen machines
a couple of years back
(http://marc.info/?l=qemu-devel&m=139051862915170&w=2). I hope this
helps.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xen-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts
@ 2016-08-15 17:46     ` Stefano Stabellini
  0 siblings, 0 replies; 14+ messages in thread
From: Stefano Stabellini @ 2016-08-15 17:46 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: peter.maydell, xen-devel, qemu-devel, anthony.perard,
	Alex Bennée, rth

On Wed, 10 Aug 2016, Gerd Hoffmann wrote:
> On Di, 2016-08-09 at 16:55 +0100, Alex Bennée wrote:
> > Hi,
> > 
> > I'm proposing for the 2.8 cycle we officially drop supporting 64 bit
> > guests on 32 bit hosts. For most of the KVM targets it doesn't make
> > any sense anyway and for TCG it makes things harder (e.g. supporting
> > 64 bit atomics on a 32 bit platform). I'm not actually convinced
> > things actually work if built or that anyone relies on these
> > combinations. Consider these patches a way of flushing any such users
> > out ;-)
> 
> Adding xen-devel to Cc.
> 
> 64bit xen hypervisor with 32bit dom0 running 32bit qemu, providing
> device emulation for 64bit dumUs at least used to be a common setup
> years ago.  I have my doubts this is still the case in recent xen
> versions, but I guess we better ask the Xen guys ...
> 
> Can anyone clarify?

Hi Gerd, thanks for CC'ing xen-devel on this.

Although 32bit Dom0 deployments are not as common as they used to be,
they are still certainly a valid scenario. However for them to work,
QEMU doesn't really need to support TCG 32bit on 64bit. QEMU when used
with Xen as accelerator doesn't actually do any CPU emulation; there was
even a proposal to remove the CPU emulation completely from Xen machines
a couple of years back
(http://marc.info/?l=qemu-devel&m=139051862915170&w=2). I hope this
helps.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts
  2016-08-09 15:55 [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Alex Bennée
                   ` (3 preceding siblings ...)
  2016-08-10  9:25   ` Gerd Hoffmann
@ 2016-08-24 12:23 ` Alex Bennée
  4 siblings, 0 replies; 14+ messages in thread
From: Alex Bennée @ 2016-08-24 12:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, rth


Alex Bennée <alex.bennee@linaro.org> writes:

> Hi,
>
> I'm proposing for the 2.8 cycle we officially drop supporting 64 bit
> guests on 32 bit hosts. For most of the KVM targets it doesn't make
> any sense anyway and for TCG it makes things harder (e.g. supporting
> 64 bit atomics on a 32 bit platform). I'm not actually convinced
> things actually work if built or that anyone relies on these
> combinations. Consider these patches a way of flushing any such users
> out ;-)

So the other use case which got mentioned to me today was developers who
want to test 64 bit system emulation on 32 bit ARM chromebooks. So
together with Xen's use case it seems this isn't going to fly for this
cycle.

I suspect for working atomics in MTTCG though we'll need to stick to
single threaded mode on these combinations.

>
> Alex Bennée (3):
>   configure: check CPU width and disable larger guests
>   configure: filter 64 bit machines on 32 bit builds
>   cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS
>
>  configure               | 50 +++++++++++++++++++++++++++++++++++++++++++++++--
>  include/exec/cpu-defs.h |  9 +++++++++
>  2 files changed, 57 insertions(+), 2 deletions(-)


--
Alex Bennée

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-08-24 12:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 15:55 [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Alex Bennée
2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests Alex Bennée
2016-08-09 16:13   ` Peter Maydell
2016-08-09 18:06   ` Richard Henderson
2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 2/3] configure: filter 64 bit machines on 32 bit builds Alex Bennée
2016-08-09 16:15   ` Peter Maydell
2016-08-09 19:08     ` Alex Bennée
2016-08-09 19:11       ` Peter Maydell
2016-08-09 15:55 ` [Qemu-devel] [RFC for 2.8 3/3] cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS Alex Bennée
2016-08-10  9:25 ` [Qemu-devel] [RFC for 2.8 0/3] Drop support for 64 bit guests on 32 bit hosts Gerd Hoffmann
2016-08-10  9:25   ` Gerd Hoffmann
2016-08-15 17:46   ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2016-08-15 17:46     ` Stefano Stabellini
2016-08-24 12:23 ` [Qemu-devel] " Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.