qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] '.' IDs and certain names breaks -global and -set
@ 2014-04-09  9:56 Markus Armbruster
  2014-04-09 11:58 ` Peter Crosthwaite
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2014-04-09  9:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Peter Crosthwaite, Alistair Francis, Gerd Hoffmann,
	Andreas Färber

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-10  2:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09  9:56 [Qemu-devel] '.' IDs and certain names breaks -global and -set Markus Armbruster
2014-04-09 11:58 ` Peter Crosthwaite
     [not found]   ` <CAKmqyKPYLUmpLME7peqTO=+AAG_f5B3EowrESA-w6eYCKN9gLA@mail.gmail.com>
     [not found]     ` <87ha5widsd.fsf@blackfin.pond.sub.org>
     [not found]       ` <534C010C.5010900@suse.de>
     [not found]         ` <CAEgOgz5YnMoW6vARAHx55kEb7LtZ3WCKaFucTbfM5-yJUSs=fg@mail.gmail.com>
2014-05-10  2:46           ` Alistair Francis

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).