From: Hollis Blanchard <hollisb@us.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm-ppc-devel@lists.sourceforge.net, benh@kernel.crashing.org,
Rusty Russell <rusty@ozlabs.au.ibm.com>,
kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [kvm-ppc-devel] booting from virtio-blk
Date: Tue, 01 Apr 2008 16:18:17 -0500 [thread overview]
Message-ID: <1207084698.6214.85.camel@basalt> (raw)
In-Reply-To: <47F2A30F.3050508@us.ibm.com>
On Tue, 2008-04-01 at 16:03 -0500, Anthony Liguori wrote:
> Benjamin Herrenschmidt wrote:
> > On Tue, 2008-04-01 at 12:09 -0500, Anthony Liguori wrote:
> >
> >
> >> It's the unfortunate side-effect of using PCI config space without
> >> passing it's semantics through to the virtio devices. Right now, you do
> >> a config_get which is basically a memcpy. If we didn't do accesses with
> >> ioread8(), you could potentially have a caller than did a config_get()
> >> of size 4 that didn't intend on having endian conversion applied.
> >>
> >> The other option would have been to provide config_get() and
> >> config_get8/16/32/64() the later performing endian conversion.
> >>
> >
> > Config space should be 8/16/32. Is that ever bridged to real PCI config
> > space anyway ? Or only virtio ? And it should be endian swapped at the
> > low level, either by your HV calls or by the low level kernel. Always.
> > That's how PCI config space is supposed to work.
Virtio accesses will not be bridged to real PCI space.
> I guess the point is, is that virtio config space is an abstraction with
> the implementation that is based on PCI converting all accesses to a
> series of 8-bit accesses. The virtio config space happens to be little
> endian just like the PCI config space.
The point is that a virtio device appears as a PCI device. Like all
other PCI devices, it has config space. Unlike all other PCI devices,
its config space is accessed with 1-byte reads.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
next prev parent reply other threads:[~2008-04-01 21:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1207051275240-git-send-email-ehrhardt@linux.vnet.ibm.com>
[not found] ` <47F225D2.9020409@linux.vnet.ibm.com>
[not found] ` <1207060430.6214.12.camel@basalt>
[not found] ` <47F24ABA.3020404@us.ibm.com>
2008-04-01 16:13 ` booting from virtio-blk Hollis Blanchard
2008-04-01 17:05 ` Anthony Liguori
2008-04-01 17:09 ` Anthony Liguori
2008-04-01 20:36 ` [kvm-ppc-devel] " Benjamin Herrenschmidt
2008-04-01 21:03 ` Anthony Liguori
2008-04-01 21:14 ` Benjamin Herrenschmidt
2008-04-01 21:18 ` Hollis Blanchard [this message]
2008-04-01 21:24 ` Benjamin Herrenschmidt
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=1207084698.6214.85.camel@basalt \
--to=hollisb@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=kvm-ppc-devel@lists.sourceforge.net \
--cc=rusty@ozlabs.au.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox