From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] qemu-kvm: Switch to upstream -enable-kvm semantics Date: Thu, 30 Dec 2010 12:21:18 +0200 Message-ID: <4D1C5D1E.6030309@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, "Daniel P. Berrange" , "Richard W. M. Jones" , Anthony Liguori To: Markus Armbruster Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27575 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753437Ab0L3KVX (ORCPT ); Thu, 30 Dec 2010 05:21:23 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 12/22/2010 02:33 PM, Markus Armbruster wrote: > We currently enable KVM by default, and when it's not available, we > print a message and fall back to TCG. Option -enable-kvm is ignored. > Option -no-kvm suppresses KVM. > > Upstream works differently: KVM is off by default, -enable-kvm > switches it on. -enable-kvm terminates the process unsuccessfully if > KVM is not available. > > upstream qemu | default |-enable-kvm > ----------------+-----------+----------- > KVM available | disabled | enabled > KVM unavailable | disabled | fail > > qemu-kvm | default |-enable-kvm| -no-kvm > ----------------+-----------+-----------+---------- > KVM available | enabled* | enabled | disabled > KVM unavailable | disabled | disabled* | disabled > > * differs from upstream > > Users of qemu and qemu-kvm need to be aware of these differences to > enable / disable use of KVM reliably. This is bothersome. > > Consider -enable-kvm when KVM is unavailable: If the user expects > qemu-kvm behavior (fall back), but qemu fails, he'll likely be > surprised and unhappy. If the user expects upstream behavior (fail), > but qemu-kvm falls back to TCG, the guest runs slow as molasses, and > the user will likely be confused and unhappy (unless he spots and > understands the "disable KVM" message). > > Eventually, we'll sort this upstream with -accel (defaults tied to > machine type). Until then, this patch reduces the difference to > upstream so that most users shouldn't need to be aware of them. > > Make -enable-kvm behave just like in upstream: enable KVM, fail if not > available. But retain current default behavior: enable KVM, fall back > to TCG. > > qemu-kvm new | default |-enable-kvm| -no-kvm > ----------------+-----------+-----------+----------- > KVM available | enabled* | enabled | disabled > KVM unavailable | disabled | fail+ | disabled > > * differs from upstream > + changed by this patch > > Bonus fix: -no-kvm -enable-kvm now enables KVM. Before, it disabled it. > Applied, thanks. -- error compiling committee.c: too many arguments to function