Re: [kvm-devel] [PATCH 3/3] virtio PCI device

From: Arnd Bergmann
Date: Fri Nov 09 2007 - 06:04:18 EST


On Thursday 08 November 2007, Anthony Liguori wrote:
>
> They already show up underneath of the PCI bus. The issue is that there
> are two separate 'struct device's for each virtio device. There's the
> PCI device (that's part of the pci_dev structure) and then there's the
> virtio_device one. I thought that setting the dev.parent of the
> virtio_device struct device would result in having two separate entries
> under the PCI bus directory which would be pretty confusing

But that's what a device tree means. Think about a USB disk drive: The drive
shows up as a child of the USB controller, which in turn is a child of
the PCI bridge. Note that I did not suggest having the virtio parent set to
the parent of the PCI device, but to the PCI device itself.

I find it more confusing to have a device just hanging off the root when
it is actually handled by the PCI subsystem.

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/