<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Rusty Russell wrote:
<blockquote cite="mid:1190536431.27805.109.camel@localhost.localdomain"
 type="cite">
  <pre wrap="">On Sat, 2007-09-22 at 12:01 +0200, Arnd Bergmann wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On Saturday 22 September 2007, Rusty Russell wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">But now each virtio device has two "struct device"s, not one.   And
you've made up a fictional bus to do it.

Yet for PCI systems, it really is a PCI device; exposing a second bus to
userspace just because we put a layer in our implementation is poor
form.

Perhaps this is the easiest way of doing it.  But it's still wrong.
      </pre>
    </blockquote>
    <pre wrap="">I think it's just a matter of perspective. In the model I'm advocating,
the PCI device is not the same as the virtio device but rather a virtio
host bridge, very much like USB or SATA works.

We could easily have multiple virtio devices behind one PCI device, but
since virtual PCI devices are cheap, a one-to-one mapping makes sense
for simplicity.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
This is still retro-justification.  The simplest way for PCI systems to
represent a virtio device as a PCI device; this makes life easy for any
guest OS.

I just know we're going to regret this...
Rusty.


  </pre>
</blockquote>
I'm not sure what's best, maybe this can help:<br>
With the virtio_find_driver you need to place all virtio drivers under
the same pci device or suggest new mapping.<br>
Using Arnd's solution (actually I implemented it for KVM before the new
patch set) and&nbsp; 1-1 mapping for pci and virtio <br>
devices makes life simpler.<br>
Dor.<br>
<br>
</body>
</html>