Commit c59249f9294e25c5c8d6c8281f0b3724e9598981
Committed by
Anthony Liguori
1 parent
1b0c87fc
configure kvm in a single place
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
13 additions
and
28 deletions
configure
... | ... | @@ -1964,19 +1964,6 @@ target_nptl="no" |
1964 | 1964 | interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"` |
1965 | 1965 | echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h |
1966 | 1966 | gdb_xml_files="" |
1967 | -target_kvm="$kvm" | |
1968 | - | |
1969 | -# Make sure the target and host cpus are compatible | |
1970 | -if test ! \( "$target_arch2" = "$cpu" -o \ | |
1971 | - \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \ | |
1972 | - \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \ | |
1973 | - \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then | |
1974 | - target_kvm="no" | |
1975 | -fi | |
1976 | -# Disable KVM for linux-user | |
1977 | -if test "$target_softmmu" = "no" ; then | |
1978 | - target_kvm="no" | |
1979 | -fi | |
1980 | 1967 | |
1981 | 1968 | case "$target_arch2" in |
1982 | 1969 | i386) |
... | ... | @@ -1988,11 +1975,6 @@ case "$target_arch2" in |
1988 | 1975 | echo "CONFIG_KQEMU=y" >> $config_mak |
1989 | 1976 | echo "#define CONFIG_KQEMU 1" >> $config_h |
1990 | 1977 | fi |
1991 | - if test "$target_kvm" = "yes" ; then | |
1992 | - echo "CONFIG_KVM=y" >> $config_mak | |
1993 | - echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | |
1994 | - echo "#define CONFIG_KVM 1" >> $config_h | |
1995 | - fi | |
1996 | 1978 | target_phys_bits=32 |
1997 | 1979 | ;; |
1998 | 1980 | x86_64) |
... | ... | @@ -2006,11 +1988,6 @@ case "$target_arch2" in |
2006 | 1988 | echo "CONFIG_KQEMU=y" >> $config_mak |
2007 | 1989 | echo "#define CONFIG_KQEMU 1" >> $config_h |
2008 | 1990 | fi |
2009 | - if test "$target_kvm" = "yes" ; then | |
2010 | - echo "CONFIG_KVM=y" >> $config_mak | |
2011 | - echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | |
2012 | - echo "#define CONFIG_KVM 1" >> $config_h | |
2013 | - fi | |
2014 | 1991 | target_phys_bits=64 |
2015 | 1992 | ;; |
2016 | 1993 | alpha) |
... | ... | @@ -2094,11 +2071,6 @@ case "$target_arch2" in |
2094 | 2071 | echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h |
2095 | 2072 | echo "#define TARGET_PPC 1" >> $config_h |
2096 | 2073 | echo "#define TARGET_PPCEMB 1" >> $config_h |
2097 | - if test "$target_kvm" = "yes" ; then | |
2098 | - echo "CONFIG_KVM=y" >> $config_mak | |
2099 | - echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | |
2100 | - echo "#define CONFIG_KVM 1" >> $config_h | |
2101 | - fi | |
2102 | 2074 | gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" |
2103 | 2075 | target_phys_bits=64 |
2104 | 2076 | ;; |
... | ... | @@ -2174,6 +2146,19 @@ case "$target_arch2" in |
2174 | 2146 | echo "#define CONFIG_XEN 1" >> $config_h |
2175 | 2147 | fi |
2176 | 2148 | esac |
2149 | +case "$target_arch2" in | |
2150 | + i386|x86_64|ppcemb) | |
2151 | + # Make sure the target and host cpus are compatible | |
2152 | + if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \ | |
2153 | + \( "$target_arch2" = "$cpu" -o \ | |
2154 | + \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \ | |
2155 | + \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \ | |
2156 | + \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then | |
2157 | + echo "CONFIG_KVM=y" >> $config_mak | |
2158 | + echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | |
2159 | + echo "#define CONFIG_KVM 1" >> $config_h | |
2160 | + fi | |
2161 | +esac | |
2177 | 2162 | echo "HWLIB=../libhw$target_phys_bits/libqemuhw$target_phys_bits.a" >> $config_mak |
2178 | 2163 | echo "#define TARGET_PHYS_ADDR_BITS $target_phys_bits" >> $config_h |
2179 | 2164 | echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak | ... | ... |