From: Anthony Liguori <anthony@codemonkey.ws>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest <lguest@ozlabs.org>,
linux-kernel@vger.kernel.org, Dor Laor <dor.laor@qumranet.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio config_ops refactoring
Date: Sat, 10 Nov 2007 16:08:06 -0600 [thread overview]
Message-ID: <47362BC6.2080704@codemonkey.ws> (raw)
In-Reply-To: <200711101858.19069.rusty@rustcorp.com.au>
Rusty Russell wrote:
> On Saturday 10 November 2007 10:45:38 Anthony Liguori wrote:
>
>> The problem is the ABI. We can either require that PCI configuration
>> values are accessed with natural instructions, or it makes very little
>> sense to use the PCI configuration space for virtio configuration
>> information.
>>
>
> To me it seems logical and simplest to allow any accesses, lay out your
> structure and emulate it in the obvious way.
>
Okay, I've got some updates that I'm going to send out now to the PCI
virtio driver but I'll also change it to switch over to a memory
layout. It's not the best PCI ABI but I can certainly live with it.
> You can put the configuration information somewhere else, but the PCI config
> space seems the logical place.
>
If we're treating the PCI config space as an opaque memory blob, instead
of as distinct registers, I think it makes more sense to just put it in
memory. In the backend, I have to treat it as a memory blob anyway and
using the PCI config space just means that I have to write all the
various PIO handlers for the different access sizes. It's much more
elegant in my mind just to have the driver provide some memory that the
host fills out.
Thanks for all the review,
Anthony Liguori
>> Either virtio config looks like a shared memory area (as lguest
>> currently implements it), or it looks like hardware registers (like
>> virtio-pci implements it). After thinking about it for a while, I don't
>> think the two can be reconciled. There are subtle differences between
>> the two that can't be hidden in the virtio interface. For instance, in
>> the PCI model, you get notified when values are read/written whereas in
>> the lguest model, you don't and need explicit status bits.
>>
>
> No. You need those status bits even if you have your register model,
> otherwise you can't tell when the configuration as a whole is stable.
> Consider the feature bits. Worse, consider extending the feature bits beyond
> 32 bits.
>
> (We will have to deal with dynamic configuration changes in future; I was
> planning on using some status bits. But it's pretty clear that it's going to
> require an explicit ack of some form.)
>
> Hope that clarifies,
> Rusty.
>
>
prev parent reply other threads:[~2007-11-10 22:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 17:48 virtio config_ops refactoring Anthony Liguori
2007-11-06 22:57 ` Rusty Russell
[not found] ` <200711070957.44165.rusty__13109.5125260346$1194390035$gmane$org@rustcorp.com.au>
2007-11-06 23:05 ` Anthony Liguori
2007-11-07 6:04 ` [PATCH] " Rusty Russell
2007-11-07 17:30 ` Anthony Liguori
2007-11-08 2:20 ` Rusty Russell
[not found] ` <200711081320.35844.rusty__6233.15023626692$1194488552$gmane$org@rustcorp.com.au>
2007-11-08 2:41 ` Anthony Liguori
2007-11-08 22:24 ` Rusty Russell
2007-11-08 22:33 ` Anthony Liguori
2007-11-08 22:47 ` [Lguest] " ron minnich
2007-11-08 22:49 ` Anthony Liguori
[not found] ` <4733A6F5.3040202@qumranet.com>
2007-11-09 3:17 ` Anthony Liguori
2007-11-09 11:54 ` Rusty Russell
2007-11-09 23:45 ` Anthony Liguori
2007-11-10 7:58 ` Rusty Russell
2007-11-10 22:08 ` Anthony Liguori [this message]
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=47362BC6.2080704@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=dor.laor@qumranet.com \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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