public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	gregory.haskins@gmail.com
Subject: Re: [PATCHv4 1/6] qemu/virtio: move features to an inline function
Date: Tue, 03 Nov 2009 07:08:00 +0200	[thread overview]
Message-ID: <4AEFBAB0.50202@redhat.com> (raw)
In-Reply-To: <4AEF5E51.80101@codemonkey.ws>

On 11/03/2009 12:33 AM, Anthony Liguori wrote:
> Michael S. Tsirkin wrote:
>> devices should have the final say over which virtio features they
>> support. E.g. indirect entries may or may not make sense in the context
>> of virtio-console. In particular, for vhost, we do not want to report to
>> guest bits not supported by kernel backend.  Move the common bits from
>> virtio-pci to an inline function and let each device call it.
>>
>> No functional changes.
>
> This is a layering violation.  There are transport specific features 
> and device specific features.  The virtio-net device should have no 
> knowledge or nack'ing ability for transport features.

It's equivalent to -cpu host.  Sometimes you want to pass-through host 
capabilities in order to make the best use of your hardware.  In fact, 
even -cpu !host allows the host kernel to nack features since the cost 
of emulation is prohibitive.

> If you need to change transport features, it suggests you're modeling 
> things incorrectly and should be supplying an alternative transport 
> implementation.

Since the kernel and qemu are developed independently, there's no way to 
ensure they support exactly the same capabilities.  The kernel can 
always lag.  The only options are to allow the host kernel to nack 
features, or to fall back to the userspace implementation.

It needs to be finer grained (qemu invoker telling qemu what the minimum 
features are needed, and qemu telling the invoker what capabilties it 
supports) but there's no way around it IMO.

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


  reply	other threads:[~2009-11-03  5:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1257200517.git.mst@redhat.com>
2009-11-02 22:23 ` [PATCHv4 1/6] qemu/virtio: move features to an inline function Michael S. Tsirkin
2009-11-02 22:33   ` Anthony Liguori
2009-11-03  5:08     ` Avi Kivity [this message]
2009-11-03 10:40     ` Michael S. Tsirkin
2009-11-02 22:23 ` [PATCHv4 2/6] qemu/net: routines to get tap fd Michael S. Tsirkin
2009-11-02 22:23 ` [PATCHv4 3/6] qemu/net: add raw backend Or Gerlitz
2009-11-02 22:24 ` [PATCHv4 4/6] qemu/net: move typedef to qemu-common.h Michael S. Tsirkin
2009-11-02 22:24 ` [PATCHv4 5/6] qemu/raw: add API to get raw socket Michael S. Tsirkin
2009-11-02 22:24 ` [PATCHv4 6/6] qemu-kvm: vhost-net implementation Michael S. Tsirkin
2009-11-05  0:22   ` Sridhar Samudrala
2009-11-05  8:23     ` Michael S. Tsirkin

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=4AEFBAB0.50202@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=gregory.haskins@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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