From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Hajnoczi <stefanha@gmail.com>,
Markus Armbruster <armbru@redhat.com>
Cc: kwolf@redhat.com, peter.maydell@linaro.org,
peter.crosthwaite@xilinx.com,
Anthony Liguori <aliguori@amazon.com>,
qemu-devel@nongnu.org, stefanha@redhat.com,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] IDs in QOM
Date: Thu, 02 Oct 2014 15:26:28 +0200 [thread overview]
Message-ID: <542D5284.1060201@suse.de> (raw)
In-Reply-To: <20141002132119.GD30564@stefanha-thinkpad.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]
Am 02.10.2014 um 15:21 schrieb Stefan Hajnoczi:
> On Wed, Oct 01, 2014 at 02:33:47PM +0200, Markus Armbruster wrote:
>> Markus Armbruster <armbru@redhat.com> writes:
>
> This discussion seems orthogonal to your patch. But I'm not applying it
> yet to give more time for discussion/review of the patch.
>
>> Is mangling array-ness into the name really a good idea? Isn't this
>> type matter, not name matter?
>
> I agree. It's nasty to hack the array selector into the name and will
> probably cause us pain down the line.
>
>> Backtracking a bit... Unlike QMP object-add, -object ) and HMP
>> object-add use QemuOpts. See object_create(), commit 68d98d3 "vl: add
>> -object option to create QOM objects from the command line", and
>> hmp_object_add(), commit cff8b2c "monitor: add object-add (QMP) and
>> object_add (HMP) command". Parameter 'id' is the QemuOpts ID, thus
>> bound by its well-formedness rule.
>>
>> Therefore, -object and HMP object-add only support a subset of the
>> possible names.
>>
>> In particular, they do not permit "automatic arrayification".
>>
>> Should QOM names be (well-formed!) IDs?
>
> Yes, I think that is sane.
>
> Are there any invalid IDs used as QOM names today?
>
> Hopefully the answer is no and we can lock everything down using
> id_wellformed().
On IRC I was arguing against that, preferring some more specific
object_property_name_wellformed() or so. This could be called from
object_property_add(), with invalid names returning an Error *.
Only thing to check for would be '/'?
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-10-02 13:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 11:59 [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts Markus Armbruster
2014-09-30 15:30 ` Eric Blake
2014-10-01 12:33 ` [Qemu-devel] IDs in QOM (was: [PATCH] util: Emancipate id_wellformed() from QemuOpts) Markus Armbruster
2014-10-02 13:21 ` Stefan Hajnoczi
2014-10-02 13:26 ` Andreas Färber [this message]
2014-10-02 14:10 ` [Qemu-devel] IDs in QOM Stefan Hajnoczi
2014-10-02 14:21 ` Markus Armbruster
2014-10-02 14:28 ` Andreas Färber
2014-10-02 14:59 ` Markus Armbruster
2014-10-02 17:41 ` Paolo Bonzini
2014-10-07 8:01 ` Markus Armbruster
2014-10-07 10:03 ` Paolo Bonzini
2014-10-07 12:16 ` Markus Armbruster
2014-10-07 15:14 ` Paolo Bonzini
2014-10-07 18:39 ` Markus Armbruster
2014-10-07 18:42 ` Paolo Bonzini
2014-10-07 18:41 ` Kevin Wolf
2014-10-07 18:45 ` Paolo Bonzini
2014-10-02 13:18 ` [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts Stefan Hajnoczi
2014-10-02 13:42 ` Markus Armbruster
2014-10-02 14:11 ` Stefan Hajnoczi
2014-10-03 8:46 ` Stefan Hajnoczi
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=542D5284.1060201@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.