qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: "Blue Swirl" <blauwirbel@gmail.com>,
	"Andreas Färber" <andreas.faerber@web.de>,
	"Jan Kiszka" <jan.kiszka@web.de>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Gleb Natapov" <gleb@redhat.com>
Subject: Re: [Qemu-devel] Re: POLL: Why do you use kqemu?
Date: Sun, 07 Jun 2009 13:37:46 -0500	[thread overview]
Message-ID: <4A2C08FA.6070407@codemonkey.ws> (raw)
In-Reply-To: <4A2BC220.6090908@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

Avi Kivity wrote:
> Blue Swirl wrote:
>> I found a bug in configure, if there are targets that can't use KVM,
>> it is disabled for all targets.
>>   
>
> Yes.  kvm support should be an array, not a scalar.  Note we shouldn't 
> even attempt kvm if the host and target don't match.

It doesn't need to be an array.  Something like this should work.

Regards,

Anthony Liguori

[-- Attachment #2: kvm-configure.patch --]
[-- Type: text/x-patch, Size: 2494 bytes --]

commit 75081cfc8a0cba8fe1760f8fc861c3dc3fba6fd1
Author: Anthony Liguori <aliguori@us.ibm.com>
Date:   Sun Jun 7 13:35:41 2009 -0500

    Don't globally disable kvm if one target doesn't support it
    
    When iterating through each element in target_list, we disable kvm if we find
    a target that doesn't support kvm.  This means that kvm can get globally
    disabled when configuring with multiple targets.
    
    Instead, use a new variable, has_kvm, to indicate whether the target has kvm
    support or not.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

diff --git a/configure b/configure
index 6ab4d80..f89327c 100755
--- a/configure
+++ b/configure
@@ -1828,16 +1828,18 @@ interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
 echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
 gdb_xml_files=""
 
+has_kvm="$kvm"
+
 # Make sure the target and host cpus are compatible
 if test "$kvm" = "yes" -a ! \( "$target_cpu" = "$cpu" -o \
   \( "$target_cpu" = "ppcemb" -a "$cpu" = "ppc" \) -o \
   \( "$target_cpu" = "x86_64" -a "$cpu" = "i386"   \) -o \
   \( "$target_cpu" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
-  kvm="no"
+  has_kvm="no"
 fi
 # Disable KVM for linux-user
 if test "$kvm" = "yes" -a "$target_softmmu" = "no" ; then
-  kvm="no"
+  has_kvm="no"
 fi
 
 case "$target_cpu" in
@@ -1850,7 +1852,7 @@ case "$target_cpu" in
       echo "CONFIG_KQEMU=yes" >> $config_mak
       echo "#define CONFIG_KQEMU 1" >> $config_h
     fi
-    if test "$kvm" = "yes" ; then
+    if test "$has_kvm" = "yes" ; then
       echo "CONFIG_KVM=yes" >> $config_mak
       echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
       echo "#define CONFIG_KVM 1" >> $config_h
@@ -1872,7 +1874,7 @@ case "$target_cpu" in
       echo "CONFIG_KQEMU=yes" >> $config_mak
       echo "#define CONFIG_KQEMU 1" >> $config_h
     fi
-    if test "$kvm" = "yes" ; then
+    if test "$has_kvm" = "yes" ; then
       echo "CONFIG_KVM=yes" >> $config_mak
       echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
       echo "#define CONFIG_KVM 1" >> $config_h
@@ -1949,7 +1951,7 @@ case "$target_cpu" in
     echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
     echo "#define TARGET_PPC 1" >> $config_h
     echo "#define TARGET_PPCEMB 1" >> $config_h
-    if test "$kvm" = "yes" ; then
+    if test "$has_kvm" = "yes" ; then
       echo "CONFIG_KVM=yes" >> $config_mak
       echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
       echo "#define CONFIG_KVM 1" >> $config_h

  reply	other threads:[~2009-06-07 18:37 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 21:57 [Qemu-devel] POLL: Why do you use kqemu? Anthony Liguori
2009-06-04 16:55 ` Anton D Kachalov
2009-06-05  0:44   ` Johannes Schindelin
2009-06-05  7:45     ` Gerd Hoffmann
2009-06-05  8:40       ` Tomasz Chmielewski
2009-06-05  9:08         ` Anton D Kachalov
2009-06-05  9:15         ` Gerd Hoffmann
2009-06-05 20:14   ` Lennart Sorensen
2009-06-05 23:23     ` Johannes Schindelin
2009-06-08  0:13       ` Jamie Lokier
2009-06-08  5:59         ` Avi Kivity
2009-06-08 11:57           ` Jamie Lokier
2009-06-08 12:03             ` Avi Kivity
2009-06-08 12:16               ` Jamie Lokier
2009-06-08 12:28                 ` Avi Kivity
2009-06-08 12:44                   ` [Qemu-devel] " Jan Kiszka
2009-06-08 13:06                     ` Avi Kivity
2009-06-08 13:18                       ` Jan Kiszka
2009-06-08 13:24                         ` Avi Kivity
2009-06-08 13:44                           ` Jan Kiszka
2009-06-08 14:03                             ` Avi Kivity
2009-06-08 12:36               ` Jan Kiszka
2009-06-08 18:25       ` [Qemu-devel] " Lennart Sorensen
2009-06-06 13:27 ` Andreas Färber
2009-06-06 16:02   ` Avi Kivity
2009-06-06 16:29     ` Blue Swirl
2009-06-06 17:02       ` [Qemu-devel] " Jan Kiszka
2009-06-06 17:25         ` Blue Swirl
2009-06-06 17:32           ` Jan Kiszka
2009-06-06 19:15             ` Andreas Färber
2009-06-07  5:43               ` Avi Kivity
2009-06-07  5:01         ` Avi Kivity
2009-06-07  7:35           ` Jan Kiszka
2009-06-07  7:46             ` Avi Kivity
2009-06-07  8:33             ` Blue Swirl
2009-06-07  8:50               ` Jan Kiszka
2009-06-07  9:01                 ` Blue Swirl
2009-06-07  9:25                   ` Jan Kiszka
2009-06-07  9:37                     ` Avi Kivity
2009-06-07  9:47                       ` Jan Kiszka
2009-06-07  9:52                         ` Avi Kivity
2009-06-07  9:56                           ` Jan Kiszka
2009-06-07 10:06                             ` Avi Kivity
2009-06-07 11:13                     ` Blue Swirl
2009-06-07 11:23                       ` Gleb Natapov
2009-06-07 11:26                         ` Blue Swirl
2009-06-07 11:29                           ` Gleb Natapov
2009-06-07 11:39                           ` Avi Kivity
2009-06-07 12:40                             ` Blue Swirl
2009-06-07 12:43                               ` Avi Kivity
2009-06-07 12:52                                 ` Gleb Natapov
2009-06-07 12:56                                   ` Avi Kivity
2009-06-07 13:18                                 ` Blue Swirl
2009-06-07 13:35                                   ` Jan Kiszka
2009-06-07 13:35                                   ` Avi Kivity
2009-06-07 18:37                                     ` Anthony Liguori [this message]
2009-06-07 18:40                                       ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A2C08FA.6070407@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=andreas.faerber@web.de \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).