From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxoXo-0008GN-A9 for qemu-devel@nongnu.org; Wed, 05 Nov 2008 15:00:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxoXm-0008FU-5c for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:59 -0500 Received: from [199.232.76.173] (port=53827 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxoXl-0008FO-MF for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:57 -0500 Received: from qw-out-1920.google.com ([74.125.92.148]:42918) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxoXk-0003a6-Ur for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:57 -0500 Received: by qw-out-1920.google.com with SMTP id 5so151591qwc.4 for ; Wed, 05 Nov 2008 11:59:56 -0800 (PST) Message-ID: <4911FB39.70707@codemonkey.ws> Date: Wed, 05 Nov 2008 13:59:53 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] compile x86_64 on i386 References: <1225918395-7404-1-git-send-email-glommer@redhat.com> <1225918395-7404-2-git-send-email-glommer@redhat.com> <4911F05F.1060106@codemonkey.ws> <5d6222a80811051118jacea765m5b3b2ffd03921958@mail.gmail.com> In-Reply-To: <5d6222a80811051118jacea765m5b3b2ffd03921958@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Glauber Costa wrote: > On Wed, Nov 5, 2008 at 5:13 PM, Anthony Liguori wrote: > >> Glauber Costa wrote: >> >>> This patch allows qemu-system-x86_64 to be compiled on a i386 host. >>> >>> >> For this to properly work, you need to fix the FIXMEs in target-i386/kvm.c >> that are around lm_capable_check. Basically, if you're on a 32-bit kernel, >> but a 64-bit capable processor, you need to mask long mode from the guest or >> it may try to use it. >> > > Yes, but 32-bit kernels work fine (since they not even try) > So they are orthogonal. > Well, I don't buy your argument, but we have the same problem with qemu-system-i386 anyway so I guess your patch makes things no worse. I've committed something slightly different that I hope will extend more easily. Thanks. Regards, Anthony Liguori >> Regards, >> >> Anthony Liguori >> >> >>> --- >>> configure | 17 ++++++++++------- >>> 1 files changed, 10 insertions(+), 7 deletions(-) >>> >>> diff --git a/configure b/configure >>> index 067c3c5..65f0c74 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -1447,13 +1447,16 @@ interp_prefix1=`echo "$interp_prefix" | sed >>> "s/%M/$target_cpu/g"` >>> echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h >>> gdb_xml_files="" >>> -# FIXME allow i386 to build on x86_64 and vice versa >>> -if test "$kvm" = "yes" -a "$target_cpu" != "$cpu" ; then >>> - kvm="no" >>> -fi >>> -# Disable KVM for linux-user >>> -if test "$kvm" = "yes" -a "$target_softmmu" = "no" ; then >>> - kvm="no" >>> +if test "$kvm" = "yes"; >>> +then >>> + # Disable KVM for linux-user >>> + if test "$target_softmmu" = "no"; >>> + then >>> + kvm="no" >>> + elif test "$target_cpu" != "$cpu" && test ! "$cpu" = "i386" -a >>> "$target_cpu" = "x86_64" ; >>> + then >>> + kvm="no" >>> + fi >>> fi >>> case "$target_cpu" in >>> >>> >> >> >> > > > >