qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Markus Armbruster <armbru@redhat.com>,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [RFC] QEMU Object Model
Date: Fri, 22 Jul 2011 15:15:49 +0200	[thread overview]
Message-ID: <4E297805.5040607@redhat.com> (raw)
In-Reply-To: <4E296FBF.1090308@codemonkey.ws>

Am 22.07.2011 14:40, schrieb Anthony Liguori:
> 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.

Hm, yes, quite possible.

Then maybe it's just its usage that I'm not happy with. You're turning
the block layer upside down to change BlockDriverStates and BDRV*State
to fit this API, which at the first sight looks pretty invasive. I was
thinking of an object not for the whole BDS, but just for the same
purpose as the QDict would have been used, that is something that can be
passed to bdrv_open.

On the other hand, it's really hard to quickly see in your git tree what
changes QOM really means. Real patches to the existing code would be
much more useful than an additional modified copy of the file.

Kevin

  reply	other threads:[~2011-07-22 13:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 15:14 [Qemu-devel] [RFC] QEMU Object Model Anthony Liguori
     [not found] ` <4E2824D2.2050401@redhat.com>
     [not found]   ` <4E2827A2.6010603@us.ibm.com>
     [not found]     ` <4E282BE3.1050404@redhat.com>
2011-07-21 14:49       ` Anthony Liguori
2011-07-21 15:04         ` Avi Kivity
2011-07-21 15:45           ` Anthony Liguori
2011-07-21 15:57             ` Avi Kivity
2011-07-21 16:32               ` Anthony Liguori
2011-07-22  7:46                 ` Kevin Wolf
2011-07-22 12:40                   ` Anthony Liguori
2011-07-22 13:15                     ` Kevin Wolf [this message]
2011-07-22 13:52                       ` Anthony Liguori
2011-07-21 15:19         ` Luca Tettamanti
2011-07-21 15:32           ` Avi Kivity
2011-07-21 15:46           ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E297805.5040607@redhat.com \
    --to=kwolf@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).