Bug 502586 - RHEL5.4: qemu-kvm should not fall back to TCG if KVM is not available
RHEL5.4: qemu-kvm should not fall back to TCG if KVM is not available
Status: CLOSED DUPLICATE of bug 489654
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4
All Linux
high Severity medium
: rc
: ---
Assigned To: Eduardo Habkost
Lawrence Lim
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-26 06:07 EDT by Mark McLoughlin
Modified: 2014-03-25 20:56 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-27 05:07:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark McLoughlin 2009-05-26 06:07:54 EDT
If you run qemu-kvm on a machine which doesn't support KVM, it will fallback to CPU emulation using TCG:

  $> mv /dev/kvm /dev/kvm.orig
  $> qemu-kvm -drive file=/var/lib/libvirt/images/test3.img -net none \
              -monitor stdio -serial telnet::4444,server,nowait -nographic
  open /dev/kvm: No such file or directory
  Could not initialize KVM, will disable KVM support

We don't want to support TCG, so we should disable this fallback.

In theory, building with --disable-cpu-emulation does just that, but it doesn't build right now, even upstream.
Comment 1 Daniel Berrange 2009-05-26 06:38:34 EDT
IMHO disabling this is a bad idea - just consider the needs of libguestfs as one example. Its RPM build process runs KVM. The RHEL/Fedora mock/koji environment runs inside a virtual machine. Ergo, there is no hardware virt available during builds. So if we remove the fallback for TCG, it'll unnecessarily cause the builds to fail.
Comment 2 Mark McLoughlin 2009-05-26 09:35:26 EDT
Well, there's two issues:

  1) What to do long term - the fallback will probably disappear as part of
     merging KVM upstream things like libguestfs will have to explicitly 
     fall back themselves.

  2) Whether we want to support TCG in 5.4 - IMHO, we don't and people who
     want TCG (for whatever reason) should use qemu from EPEL
Comment 3 Mark McLoughlin 2009-05-26 11:47:19 EDT
Alternative discussed solution is:

 1) Move /usr/bin/qemu-kvm to /usr/libexec/qemu-kvm

 2) Make /usr/bin/qemu-kvm a script which checks whether KVM is available
    and and, if not, warns that TCG is not supported

Rationale is that TCG *is* needed for RHEV-M - apparently it uses qemu -no-kvm for some use cases
Comment 4 Dor Laor 2009-05-27 05:07:50 EDT
(In reply to comment #3)
> Alternative discussed solution is:
> 
>  1) Move /usr/bin/qemu-kvm to /usr/libexec/qemu-kvm
> 
>  2) Make /usr/bin/qemu-kvm a script which checks whether KVM is available
>     and and, if not, warns that TCG is not supported
> 
> Rationale is that TCG *is* needed for RHEV-M - apparently it uses qemu -no-kvm
> for some use cases  

Since I have an open bug that should do exactly that + rhev-M needs -no-kvm mode
I'm closing this bug.
Comment 5 Mark McLoughlin 2009-05-27 05:28:33 EDT

*** This bug has been marked as a duplicate of bug 489654 ***

Note You need to log in before you can comment on or make changes to this bug.