[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semant
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics |
Date: |
Wed, 15 Dec 2010 18:57:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Anthony Liguori <address@hidden> writes:
> On 12/15/2010 09:50 AM, 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
>> ----------------+-----------+-----------
>> KVM available | enabled* | enabled
>> KVM unavailable | 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).
>>
>> Switch to upstream semantics: KVM off by default, -enable-kvm switches
>> it on, and when it can't, it's fatal.
>>
>> Having to enable KVM explicitly is annoying, but the proper place to
>> address that is upstream.
>>
>> Signed-off-by: Markus Armbruster<address@hidden>
>>
>
> Backwards compatibility is going to kill us if we try to make this change.
>
> Current qemu-kvm behavior:
>
> default: -accel kvm,tcg
> -no-kvm: -accel tcg
> -enable-kvm: -accel kvm,tcg
>
> Current upstream behavior
>
> default: -accel tcg
> -enable-kvm: -accel kvm
>
> I think we should tie `-accel' to the machine type. For qemu-kvm, a
> different default machine type should be used than upstream qemu (it
> really should be a configure switch).
>
> For `pc', the default `-accel' behavior should remain 'tcg'. For
> kvmpc', the default `-accel' behavior should be 'kvm,tcg'.
>
> -no-kvm should be deprecated. -enable-kvm should also be deprecated
> in favor of the `-accel' option.
I'm fine with -accel and deprecating the old options. But until we have
that:
> In the short term, it would be a good idea to modify qemu-kvm to
> switch the -enable-kvm semantics to match upstream (fail if KVM isn't
> available).
That's what my patch does.
Additionally, it changes the default to match upstream: KVM disabled.
What do you want changed in my patch?
> Adding an alias for 'kvmpc' upstream and qemu-kvm and
> making qemu-kvm default to 'kvmpc' would be helpful for management
> tools too.
That would address "Having to enable KVM explicitly is annoying".
- [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Anthony Liguori, 2010/12/15
- [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics,
Markus Armbruster <=
- [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Avi Kivity, 2010/12/21
- [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Richard W.M. Jones, 2010/12/21
- [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Richard W.M. Jones, 2010/12/21
- [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Markus Armbruster, 2010/12/21
- Re: [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Anthony Liguori, 2010/12/21
- Re: [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics, Alexander Graf, 2010/12/21