All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Huang Ying <ying.huang@intel.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH -v2] Add MCE support to KVM
Date: Wed, 22 Apr 2009 08:57:16 +0300	[thread overview]
Message-ID: <49EEB1BC.7020709@redhat.com> (raw)
In-Reply-To: <49EE3794.1070904@codemonkey.ws>

Anthony Liguori wrote:
> Avi Kivity wrote:
>>
>> Example: SMP.
>
> There was no KVM support in QEMU at the time when SMP was introduced.  
> Had there been, I see no reason not to do it in upstream QEMU.
>

Marcelo's been working on getting iothread (needed for smp) into qemu 
for a while.  It will take still more time.  All this with the previous 
implementation available.

In contrast, initial smp support was hacked into kvm-userspace in a few 
days.  Sure we didn't have an iothread (vcpu 0 did all the work) and it 
was horribly ugly and buggy, but we got the feature out for testing and 
got feedback, not only on the userspace bits, but also on the kernel 
bits which were new.

Going through qemu would have delayed the work significantly, as well as 
slowed down kernel development.

>> Example: vlan API.
>
> You'll have to be more specific.  Do you mean the up coming vlan API 
> refactoring?  That absolutely should be happening in upstream QEMU.

The refactoring, absolutely.  But if I have kernel support for zero copy 
tomorrow, do I wait until qemu completes refactoring the VLAN API, or do 
I hack something in so I can test it and get the benefit to users?

>>> As long as people are using kvm-userspace.git instead of qemu.git, 
>>> we're failing IMHO.  If kvm-userspace.git is basically the 
>>> equivalent of the x86 git kernel tree, linux-next, or something like 
>>> that, then that's a good thing.
>>
>> That's definitely a long term goal, but qemu is not yet at a point 
>> where it is easy to implement new features efficiently.  Once it 
>> reaches that state, kvm-userspace will become a simple staging ground 
>> (or even disappear entirely).
>
> The simple fact is that right now, Fedora ships kvm-userspace and 
> calls it QEMU.  It builds packages for non-KVM enabled boards.  There 
> is a very large userspace that consumes packages derived from 
> kvm-userspace.  Like it or not, kvm-userspace is not an experimental 
> staging ground for QEMU.

It depends on how fast qemu development is.  If everything took no time, 
sure, but that is not the case.

>
> The only reasonable things to do IMHO is for as much as humanly 
> possible to be deferred to QEMU or for you to comes to terms with your 
> role as a defacto QEMU maintainer and start pushing back more on patch 
> sets that don't take into consideration TCG/non-KVM environments :-)

I do that whenever possible -- and it most often is possible.

But neither kvm nor tcg are not going to be supersets of the other.  Of 
course qemu is not a subset of kvm as it has a much wider target/host 
variety.  But also kvm will always have features that tcg does not 
have.  For example AVX is easy to implement with a few lines in the 
kernel and qemu, but would take a massive effort in tcg.  It would have 
a large performance impact for AVX-enabled apps/guests/hosts 
combinations, not so much for tcg.

kvm wants features for large-scale production deployment.  This means 
focus on performance and managebility.  qemu/tcg is more for hobbyist 
use or as a developer tool for developing operating system kernels.  
This means more focus on ease of use.
>
> MCE is a perfect example of something that really has no reason to go 
> in via kvm-userspace since we have enough KVM support in upstream QEMU. 

I agree.  But the requirement that everything in kvm have a counterpart 
in tcg is not realistic.  The primary use of MCE for example is used to 
allow a guest to survive bad hardware.  I don't see this as being useful 
in any way on qemu/tcg.  A secondary is is to debug mce handling in 
guests OSes; now this is useful with tcg, but I'd hesitate to call it a 
requirement, it's more of a nice to have.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


  reply	other threads:[~2009-04-22  5:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  7:29 [PATCH -v2] Add MCE support to KVM Huang Ying
2009-04-18 15:54 ` Anthony Liguori
2009-04-19  8:39   ` Avi Kivity
2009-04-21 16:06     ` Anthony Liguori
2009-04-21 16:19       ` Avi Kivity
2009-04-21 16:12     ` Anthony Liguori
2009-04-21 16:21       ` Avi Kivity
2009-04-21 19:55         ` Anthony Liguori
2009-04-21 20:00           ` Avi Kivity
2009-04-21 20:08             ` Anthony Liguori
2009-04-21 20:45               ` Avi Kivity
2009-04-21 21:16                 ` Anthony Liguori
2009-04-22  5:57                   ` Avi Kivity [this message]
2009-04-22 13:32                     ` Anthony Liguori
2009-04-22 13:58                       ` Avi Kivity
2009-04-22  2:32         ` Huang Ying
2009-04-20  1:19   ` Huang Ying
2009-04-20  3:57     ` Kyle Moffett
2009-04-20  5:04       ` Huang Ying
2009-04-20  5:30       ` Andi Kleen
2009-04-22  2:42       ` Gregory Haskins

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=49EEB1BC.7020709@redhat.com \
    --to=avi@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.