|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [RFC] QEMU Object Model |
Date: | Fri, 22 Jul 2011 07:40:31 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10 |
On 07/22/2011 02:46 AM, Kevin Wolf wrote:
Am 21.07.2011 18:32, schrieb Anthony Liguori:Just as we're now realizing that we need to do dramatic things in the block layer to make -blockdev work, I'm sure we're going to realize that we want to do PCI hotplug of virtio-serial and therefore we need to do dynamic creation/destruction of character devices.Just to have it said: -blockdev isn't the reason for doing something like this. The reason is that you want it. (Not saying anything about whether it is a good or a bad thing to want) What -blockdev really needs is an additional parameter to bdrv_open that carries the options. Could be as simple as a QDict, though that might not align well with your QAPI which wants everything to be C. But in any case, generalising the qdev properties mechanism to be usable in other contexts should be enough for anything.
That's what QOM is. qdev generalized.The problem with "just adding a QDict to bdrv_open" is that you're only solving the problem for the block layer. The fundamental problem that we're trying to solve with blockdev is creating backends independently of devices and connecting backends to each other.
Chardev has the same need (via mux devices). Regards, Anthony Liguori
There's really no pressing need to start yet another rewrite of half of qemu just for -blockdev. And in turn -blockdev doesn't have to wait for such a rewrite. Kevin
[Prev in Thread] | Current Thread | [Next in Thread] |