From: Rusty Russell <rusty@rustcorp.com.au>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Anthony Liguori <aliguori@us.ibm.com>, 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: Fri, 9 Nov 2007 09:24:28 +1100 [thread overview]
Message-ID: <200711090924.28659.rusty@rustcorp.com.au> (raw)
In-Reply-To: <4732774C.6020903@codemonkey.ws>
On Thursday 08 November 2007 13:41:16 Anthony Liguori wrote:
> Rusty Russell wrote:
> > On Thursday 08 November 2007 04:30:50 Anthony Liguori wrote:
> >> I would prefer that the virtio API not expose a little endian standard.
> >> I'm currently converting config->get() ops to ioreadXX depending on the
> >> size which already does the endianness conversion for me so this just
> >> messes things up. I think it's better to let the backend deal with
> >> endianness since it's trivial to handle for both the PCI backend and the
> >> lguest backend (lguest doesn't need to do any endianness conversion).
> >
> > -ETOOMUCHMAGIC. We should either expose all the XX interfaces (but this
> > isn't a high-speed interface, so let's not) or not "sometimes" convert
> > endianness. Getting surprises because a field happens to be packed into 4
> > bytes is counter-intuitive.
>
> Then I think it's necessary to expose the XX interfaces. Otherwise, the
> backend has to deal with doing all register operations at a per-byte
> granularity which adds a whole lot of complexity on a per-device basis
> (as opposed to a little complexity once in the transport layer).
Huh? Take a look at the drivers, this simply isn't true. Do you have
evidence that it will be true later?
Plus your code will be smaller doing a single writeb/readb loop than trying to
do a switch statement.
> You really want to be able to rely on multi-byte atomic operations too
> when setting values. Otherwise, you need another register to just to
> signal when it's okay for the device to examine any given register.
You already do; the status register fills this role. For example, you can't
tell what features a guest understands until it updates the status register.
Hope that clarifies,
Rusty.
next prev parent reply other threads:[~2007-11-08 22:24 UTC|newest]
Thread overview: 32+ 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
2007-11-06 22:57 ` Rusty Russell
2007-11-06 23:05 ` Anthony Liguori
2007-11-06 23:05 ` Anthony Liguori
2007-11-07 6:04 ` [PATCH] " Rusty Russell
2007-11-07 6:04 ` Rusty Russell
2007-11-07 17:30 ` Anthony Liguori
2007-11-08 2:20 ` Rusty Russell
2007-11-08 2:20 ` Rusty Russell
2007-11-08 2:41 ` Anthony Liguori
2007-11-08 22:24 ` Rusty Russell [this message]
2007-11-08 22:33 ` Anthony Liguori
2007-11-08 22:33 ` Anthony Liguori
2007-11-08 22:47 ` [Lguest] " ron minnich
2007-11-08 22:49 ` Anthony Liguori
2007-11-08 22:49 ` Anthony Liguori
2007-11-09 0:16 ` Dor Laor
[not found] ` <4733A6F5.3040202@qumranet.com>
2007-11-09 3:17 ` Anthony Liguori
2007-11-09 3:17 ` Anthony Liguori
2007-11-08 22:47 ` ron minnich
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
2007-11-10 22:08 ` Anthony Liguori
2007-11-10 7:58 ` Rusty Russell
2007-11-09 23:45 ` Anthony Liguori
2007-11-09 11:54 ` Rusty Russell
2007-11-08 22:24 ` Rusty Russell
2007-11-08 2:41 ` Anthony Liguori
2007-11-07 17:30 ` Anthony Liguori
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=200711090924.28659.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=aliguori@us.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=dor.laor@qumranet.com \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.