Peter Maydell
2013-Jun-21 16:41 UTC
what should a virtio-mmio transport without a backend look like?
On 21 June 2013 17:02, Christopher Covington <cov at codeaurora.org> wrote:> Would using CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES enumeration > instead of device tree be any easier?My general view is that the kernel command line is the user's to manipulate, and that QEMU shouldn't touch it at all (just pass it through). (Conversely, QEMU shouldn't require the user to specify odd kernel command line arguments in order to make things work.) (Having talked with Grant Likely I now have a reasonable plan for manipulating the dtb to add virtio nodes, so I'm happy that that's the right way to go.) As it happens, if you use the command line to specify a virtio device it doesn't make the same complaint about bad magic number as if you specify it via dtb, but that should probably be fixed in the kernel :-)> How does the back end know which devices to create?Anything specified via -device on the QEMU command line is created after the board model has initialized. When a virtio-blk-backend (or whatever) is created it's automatically plugged into the first available matching bus (in the same way that if you create a PCI card via -device it plugs into the first available PCI slot). -- PMM
Pawel Moll
2013-Jun-21 16:47 UTC
what should a virtio-mmio transport without a backend look like?
On Fri, 2013-06-21 at 17:41 +0100, Peter Maydell wrote:> On 21 June 2013 17:02, Christopher Covington <cov at codeaurora.org> wrote: > > Would using CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES enumeration > > instead of device tree be any easier? > > My general view is that the kernel command line is > the user's to manipulate, and that QEMU shouldn't > touch it at all (just pass it through). (Conversely, > QEMU shouldn't require the user to specify odd > kernel command line arguments in order to make things > work.)I couldn't agree more. Command line is for the user and user only. And the mention config option is optional ;-) (and, interestingly enough it wasn't there in the original version of the driver).> As it happens, if you use the command line to specify > a virtio device it doesn't make the same complaint about > bad magic number as if you specify it via dtb, but that > should probably be fixed in the kernel :-)I don't really see how this would be possible - the "complaining code" is just a normal platform device probe function. And whether specified in the command line or in the tree, it's the same - platform - device. Are you sure you haven't misspelled the parameter name or something in the definition syntax? ;-) Pawe?
Peter Maydell
2013-Jun-21 17:01 UTC
what should a virtio-mmio transport without a backend look like?
On 21 June 2013 17:47, Pawel Moll <pawel.moll at arm.com> wrote:> On Fri, 2013-06-21 at 17:41 +0100, Peter Maydell wrote: >> As it happens, if you use the command line to specify >> a virtio device it doesn't make the same complaint about >> bad magic number as if you specify it via dtb, but that >> should probably be fixed in the kernel :-) > > I don't really see how this would be possible - the "complaining code" > is just a normal platform device probe function.Sorry, you're correct and I misremembered. I just retested with specifying via command line and it behaves the same way as via dtb. -- PMM
Possibly Parallel Threads
- what should a virtio-mmio transport without a backend look like?
- what should a virtio-mmio transport without a backend look like?
- what should a virtio-mmio transport without a backend look like?
- what should a virtio-mmio transport without a backend look like?
- what should a virtio-mmio transport without a backend look like?