From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZkNd-0005bo-AF for qemu-devel@nongnu.org; Thu, 02 Oct 2014 13:41:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZkNY-0007Xf-KJ for qemu-devel@nongnu.org; Thu, 02 Oct 2014 13:41:29 -0400 Received: from mail-ig0-x232.google.com ([2607:f8b0:4001:c05::232]:57262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZkNY-0007Xb-Ev for qemu-devel@nongnu.org; Thu, 02 Oct 2014 13:41:24 -0400 Received: by mail-ig0-f178.google.com with SMTP id l13so2859716iga.17 for ; Thu, 02 Oct 2014 10:41:23 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <542D8E3C.6000207@redhat.com> Date: Thu, 02 Oct 2014 19:41:16 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1412078370-3555-1-git-send-email-armbru@redhat.com> <87iok46kb8.fsf@blackfin.pond.sub.org> <20141002132119.GD30564@stefanha-thinkpad.redhat.com> <542D5284.1060201@suse.de> <87tx3mblhq.fsf@blackfin.pond.sub.org> <542D6127.7040308@suse.de> <87tx3ma56u.fsf@blackfin.pond.sub.org> In-Reply-To: <87tx3ma56u.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] IDs in QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, stefanha@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, Anthony Liguori Il 02/10/2014 16:59, Markus Armbruster ha scritto: > Andreas Färber writes: > >> Am 02.10.2014 um 16:21 schrieb Markus Armbruster: >>> Andreas Färber writes: >>> >>>> 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 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. >>> >>> Andreas? >> >> -> Paolo ;) > > Paolo? Uhm, I had written an answer but Thunderbird ate it. Oh well. I think foo[*] is not really a matter of typing, but a matter of grouping similar children. It does not really matter if foo[1] is deleted while foo[2] still exists, and it does not really matter if the next object created will be foo[1] or foo[3]. While we do not have any example, QOM could support true array properties, e.g. with type intList. Also note that while foo[*] was a generalization of MemoryRegion code, the same idea has also existed forever for devices. /machine/peripheral_anon and /machine/unattached do not currently use automatic array-ification via foo[*], but they could. >> If you just want to call id_wellformed() for -object / object-add, I >> won't object to restricting it beyond the necessary, but it'll lead to >> two places doing validity checks for QOM. > > id_wellformed() is *already* called for -object and HMP object-add. > That's exactly my point! > > Please reread my explanation, and if it's insufficient, ask for > clarification. > > Subject: IDs in QOM (was: [PATCH] util: Emancipate id_wellformed() from QemuOpts) > Date: Wed, 01 Oct 2014 14:33:47 +0200 > Message-ID: <87iok46kb8.fsf@blackfin.pond.sub.org> I think it is okay to keep calling id_wellformed(), since it covers the QOM-specific constraint that slashes must be outlawed. It just makes the children of /objects a bit more restricted in their naming, but that is harmless because object_del can only delete objects created with object_add. Paolo