Re: Use of virtio device IDs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Zachary Amsden
Date: Tuesday, November 13, 2007 - 6:59 am

On Tue, 2007-11-13 at 08:18 -0500, Gregory Haskins wrote:


I would tend to disagree with that statement.  The point of PV is a
simpler to implement guest/host interface, which sometimes results in a
higher performance interface.  PV does not always mean high performance,
nor does high performance imply PV is necessary.


Device discovery, bus enumeration and shared memory configuration space
mapping are all very useful features that require complex negotiation
with the hypervisor.  Those are provided implicitly in a standardized
way by PCI (or by any good hardware bus protocol).


There is no reason you need to sacrifice performance for broader
compatibility with well designed virtual devices on modern hardware.


What if the platform in question does have PCI.  How are you going to
write drivers for non-Linux guests?  Design a new bus protocol and
driver system for pv-only devices which can't run anywhere except for a
couple selected guests, or design along the lines of what the physical
hardware on your platform actually looks like?  It's not like you can
construct a full-featured virtualization of x86 without implenting PCI
at some level anyway.

Note this is not an argument for PCI.  It is an argument for devices
that look like hardware on whatever platform you are virtualizing.  On
s390, that might be a bit different than on x86.  But the key idea is
re-use the platform architecture as much as possible.  This gets you far
more code sharing and interoperability for devices.

Just because you can paravirtualize everything does not mean it is a
good idea or more efficient.  A good high performance "paravirtualized"
network driver only needs one efficient place to trap to the hypervisor,
that is to kick off a TX queue.  Nothing else needs to be
paravirtualized to make this efficient, and now you have a driver that
is fairly easily ported among different operating systems because it
reuses many architectural primitives.

So I think it is a good thing for virtio to allow coupling to a PCI
device backend for x86, but be generic enough to allow coupling to other
backends for non-PCI architectures.  Perhaps the top-level device code
and TX/RX queues can be re-used, although I'm not convinced sharing at
this layer gives so much benefit in terms of raw lines of code.


What about XenBus?  Device discovery and configuration are a huge amount
of work, especially when done without a standard to work from.

Just my $0.02.

Zach

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Use of virtio device IDs, Anthony Liguori, (Tue Nov 6, 10:16 am)
Re: Use of virtio device IDs, Anthony Liguori, (Tue Nov 6, 11:49 am)
Re: Use of virtio device IDs, Gregory Haskins, (Tue Nov 6, 8:38 pm)
Re: Use of virtio device IDs, Avi Kivity, (Tue Nov 6, 10:40 pm)
Re: Use of virtio device IDs, Rusty Russell, (Tue Nov 6, 11:09 pm)
Re: Use of virtio device IDs, Anthony Liguori, (Tue Nov 6, 11:29 pm)
Re: Use of virtio device IDs, Anthony Liguori, (Wed Nov 7, 10:33 am)
Re: Use of virtio device IDs, Gregory Haskins, (Wed Nov 7, 1:38 pm)
Re: Use of virtio device IDs, Avi Kivity, (Wed Nov 7, 11:37 pm)
Re: Use of virtio device IDs, Gerd Hoffmann, (Thu Nov 8, 2:17 am)
Re: Use of virtio device IDs, Anthony Liguori, (Thu Nov 8, 9:40 am)
Re: Use of virtio device IDs, Gregory Haskins, (Tue Nov 13, 6:18 am)
Re: Use of virtio device IDs, Zachary Amsden, (Tue Nov 13, 6:59 am)