[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] compile x86_64 on i386
From: |
Glauber Costa |
Subject: |
Re: [Qemu-devel] [PATCH] compile x86_64 on i386 |
Date: |
Wed, 5 Nov 2008 17:18:36 -0200 |
On Wed, Nov 5, 2008 at 5:13 PM, Anthony Liguori <address@hidden> 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.
> 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
>>
>
>
>
>
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."