virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [RFC 1/4] New virtio bus driver
Date: Mon, 09 Jul 2007 17:56:21 +0300	[thread overview]
Message-ID: <46924C95.8010002@qumranet.com> (raw)
In-Reply-To: <200707091624.57725.arnd@arndb.de>

Arnd Bergmann wrote:
> On Monday 09 July 2007, Avi Kivity wrote:
>   
>> Suppose there is one message queued.  The host reconfigures and sends 
>> the message. A new reconfiguration event now cannot be propagated.
>>
>> If there are two messages queued, the host can post the updates in the 
>> second message.  The guest would then post two new messages (since it 
>> can't tell whether any reconfiguration events occured after the second 
>> message), the host would fill one, and everyone is happy.
>>     
>
> But you can always have one more event than you have space in the queue,
> so the host _still_ needs to do its own queuing of these events.
>
>   

It's probably enough to keep a flag that the guest is not up-to-date, 
and have a reconfiguration message include the entire configuration 
(e.g. don't send deltas).

>> Rusty, If you agree with this, I think it needs to be added to the core 
>> protocol.
>>     
>
> Why is it part of the core protocol? If a driver needs a feature like
> this, it needs to have an additional virtqueue, but the core does not
> need to care that this is about reconfiguration.
>
>   

I meant that drivers need that second (or third) virtqueue.  Actual 
configuration messages could be added later.  virtqueue itself is of 
course oblivious to this stuff happening behind (or rather on top) of 
its back.

> I would make a clear distinction between the stuff that is in the
> initial config space (read-only) and other things that can be reconfigured.
> If a device needs to read a property that can dynamically change,
> it probably makes sense for it to start by reading from the configuration
> virtqueue instead of the static config space.
>
>   

Agreed.

>> [btw, virtbus could be implemented atop virtqueue as well]
>>     
>
> You mean 'one virtbus'? Certainly, that sounds good. You can have
> a virtio device with a single read-only virtqueue that emits messages
> about other devices coming and going.
>   

Yes.  A message would contain the device type, identifier, interrupt 
number (when applicable), and location of the the device's configuration 
information (including its virtqueues).

> I think that is how Carsten's s390 virtual device bus works.
>
> For virtbus in general, I'd think that this model would only be one
> of several possible, where the others could be PCI and whatever Xen
> prefers for device enumeration (I haven't looked at that in detail).
>
> [interesting side effect: you can have a PCI device that actually
> is a virtbus bridge device, as the parent for other hcall based
> virtio devices, along with other PCI devices, some of which are
> a virtio device by themselves.]
>   

That still doesn't help with older Linuces and closed-source OSes, which 
are the main motivation for PCI.  Newer Linux should be pure virtbus IMO.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2007-07-09 14:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-06 12:42 [RFC 0/4] Using a generic bus_type for virtio arnd
2007-07-06 12:42 ` [RFC 1/4] New virtio bus driver arnd
2007-07-08  9:59   ` Avi Kivity
2007-07-08 15:29     ` Arnd Bergmann
2007-07-08 15:48       ` Avi Kivity
2007-07-08 20:29         ` Arnd Bergmann
2007-07-08 23:42           ` Rusty Russell
2007-07-09  6:49           ` Avi Kivity
2007-07-09 11:18             ` Arnd Bergmann
2007-07-09 11:41               ` Avi Kivity
2007-07-09 11:38                 ` Arnd Bergmann
2007-07-09 12:09                   ` Avi Kivity
2007-07-09 14:24                     ` Arnd Bergmann
2007-07-09 14:56                       ` Avi Kivity [this message]
2007-07-09 16:33                         ` Arnd Bergmann
2007-07-10  1:53                     ` Rusty Russell
2007-07-10  7:56                       ` Avi Kivity
2007-07-10  1:17             ` Rusty Russell
2007-07-10  6:06               ` Avi Kivity
2007-07-06 12:42 ` [RFC 2/4] Convert virtio_net to new virtio bus arnd
2007-07-06 12:42 ` [RFC 3/4] Convert virtio_blk " arnd
2007-07-06 12:42 ` [RFC 4/4] Example virtio host implementation, using chardev arnd
2007-07-08  2:15 ` [RFC 0/4] Using a generic bus_type for virtio Rusty Russell
2007-07-08  9:45   ` Avi Kivity
2007-07-08 15:55   ` Arnd Bergmann
2007-07-08  9:42 ` Avi Kivity

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=46924C95.8010002@qumranet.com \
    --to=avi@qumranet.com \
    --cc=arnd@arndb.de \
    --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;
as well as URLs for NNTP newsgroup(s).