Received: from eggs.gnu.org ([2001:4830:134:3::10]:38358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXpFE-0004Tl-Cu for qemu-devel@nongnu.org; Wed, 09 Apr 2014 05:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXpF8-0000ia-Ql for qemu-devel@nongnu.org; Wed, 09 Apr 2014 05:56:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXpF8-0000iS-Iq for qemu-devel@nongnu.org; Wed, 09 Apr 2014 05:56:30 -0400 From: Markus Armbruster Date: Wed, 09 Apr 2014 11:56:25 +0200 Message-ID: <871tx6ddx2.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] '.' IDs and certain names breaks -global and -set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Peter Crosthwaite , Alistair Francis , Gerd Hoffmann , Andreas =?utf-8?Q?F=C3=A4rber?= We have a number of device model names containing '.'. They're unusable with -global. That's because "-global A.B.C=foo" gets parsed as driver = "A" property = "B.C" value = "foo". Wrong when the device model name is really A.B and the property is C, e.g. "-global cfi.pflash01.name". Related problem: QemuOpts ID may contain '.'. Such IDs are in fact common practice. Unfortunately, they're unusable with -set. For instance, -set A.B.C.D=foo gets parsed as group = "A" id = "B" arg = "C.D" value = "foo" Wrong when the id is really B.C and the arg is D, e.g. "-device isa-serial,id=s.0 -set device.s.0.chardev=c0". This issue isn't limited to devices. Related historical problem: commit b560a9a. Possible solutions: * Outlaw '.' in QemuOpts parameter names (and thus device model names and property names, because QemuOpts is a major way for users to specify them). * Resolve the syntactic ambiguity semantically (ugh) * Extend the syntax of -global and -set to let users avoid the issue, or replace them outright * Use the old ostrich algorithm Andreas, what restrictions does QOM place on QOM path component names? No '/', obviously. Anything else?