qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] qemu: make virtio-blk PCI compliant by defa


From: john cooper
Subject: Re: [Qemu-devel] Re: [PATCH] qemu: make virtio-blk PCI compliant by default
Date: Wed, 23 Sep 2009 00:56:46 -0400
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Anthony Liguori wrote:
john cooper wrote:
Avi Kivity wrote:
On 09/22/2009 05:21 PM, john cooper wrote:
Can we just read this page as a virtqueue command instead of having it
mapped permanently?
Probably although I hadn't looked specifically
at doing so.   Mapping the data via an unused
pci bar is pretty trivial and seemed minimally
intrusive to the existing driver.
We'll run out of bars if we expend them like that.

Agreed.  However my motivation here was to use a
single additional bar specifically to compensate
for the PCI spec imposed 256 byte size limitation
of the config space mapping.  As we're defining the
content/size of this area, future use to accommodate
additional data should be unrestricted.

Why expose the whole ATAPI page instead of just the serial number?

Exposing the s/n alone was what I'd done originally
which in retrospect was well contained within the
pci config area -- even if squandering the somewhat
limited space in that area.

However exposing it as an identify page allows use
of the existing HDIO_GET_IDENTITY ioctl (and existing
use of that interface, eg: "hdparm -i") as a means to
extract the s/n along with potentially useful related
data in the page.

Creation of the identify structure is within qemu
as that is where the information exists.  And this
allows the virtio_blk driver to treat the data as
opaque, simply exporting it uninterpreted via a copyout.
So the only real issue remaining is how to best saw
a hole between qemu and the guest virtio_blk driver
to transfer the identity data.

I think the proper solution is to move the config to a separate bar that's MMIO instead of PIO. config access is never performance sensitive and an MMIO bar has less restrictions on size.

That's exactly what I've done.  I'll clean up the
patch and post it here so we can have a more concrete
discussion.

-john

--
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]