Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 16:26 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: > >> Markus Armbruster writes: > >> > >> > Paolo Bonzini writes: > >> > > >> >> On 11/03/21 15:08, Markus Armbruster wrote: > >> I would rather

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Markus Armbruster
Kevin Wolf writes: > Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: >> Markus Armbruster writes: >> >> > Paolo Bonzini writes: >> > >> >> On 11/03/21 15:08, Markus Armbruster wrote: >> I would rather keep the OptsVisitor here. Do the same check for JSON >> syntax that

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: > Markus Armbruster writes: > > > Paolo Bonzini writes: > > > >> On 11/03/21 15:08, Markus Armbruster wrote: > I would rather keep the OptsVisitor here. Do the same check for JSON > syntax that you have in

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-13 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> On 11/03/21 15:08, Markus Armbruster wrote: I would rather keep the OptsVisitor here. Do the same check for JSON syntax that you have in qobject_input_visitor_new_str, and whenever you need to walk all -object arguments, use

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 09:46:54 +0100, Paolo Bonzini wrote: > On 12/03/21 09:14, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > > > On 11/03/21 15:08, Markus Armbruster wrote: > > > > > I would rather keep the OptsVisitor here. Do the same check for JSON > > > > > syntax that you

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Paolo Bonzini
On 12/03/21 09:14, Markus Armbruster wrote: Paolo Bonzini writes: On 11/03/21 15:08, Markus Armbruster wrote: I would rather keep the OptsVisitor here. Do the same check for JSON syntax that you have in qobject_input_visitor_new_str, and whenever you need to walk all -object arguments, use

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Markus Armbruster
Paolo Bonzini writes: > On 11/03/21 15:08, Markus Armbruster wrote: >>> I would rather keep the OptsVisitor here. Do the same check for JSON >>> syntax that you have in qobject_input_visitor_new_str, and whenever >>> you need to walk all -object arguments, use something like this: >>> >>>

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Paolo Bonzini
On 11/03/21 15:08, Markus Armbruster wrote: I would rather keep the OptsVisitor here. Do the same check for JSON syntax that you have in qobject_input_visitor_new_str, and whenever you need to walk all -object arguments, use something like this: typedef struct ObjectArgument {

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Markus Armbruster
Paolo Bonzini writes: > On 11/03/21 11:38, Markus Armbruster wrote: >> Here's a differently terrible hack. We have >> keyval_parse() visitor >> optarg > QObject > QAPI type >> Idea: hack the QObject. If we're working for -object, and QObject >> maps >> key

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Markus Armbruster
Kevin Wolf writes: > Am 11.03.2021 um 12:24 hat Peter Krempa geschrieben: >> On Thu, Mar 11, 2021 at 09:37:11 +0100, Kevin Wolf wrote: >> > Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: >> > > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: >> > > > Am 10.03.2021 um 15:31 hat

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Peter Krempa
On Thu, Mar 11, 2021 at 12:41:42 +0100, Kevin Wolf wrote: > Am 11.03.2021 um 12:24 hat Peter Krempa geschrieben: > > On Thu, Mar 11, 2021 at 09:37:11 +0100, Kevin Wolf wrote: > > > Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: > > > > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Kevin Wolf
Am 11.03.2021 um 12:24 hat Peter Krempa geschrieben: > On Thu, Mar 11, 2021 at 09:37:11 +0100, Kevin Wolf wrote: > > Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: > > > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: > > > > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: >

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Peter Krempa
On Thu, Mar 11, 2021 at 09:37:11 +0100, Kevin Wolf wrote: > Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: > > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: > > > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > > > > On 10/03/21 15:22, Peter Krempa wrote: [...] > >

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Paolo Bonzini
On 11/03/21 11:38, Markus Armbruster wrote: Here's a differently terrible hack. We have keyval_parse() visitor optarg > QObject > QAPI type Idea: hack the QObject. If we're working for -object, and QObject maps key "qom-type" to value

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Markus Armbruster
Kevin Wolf writes: > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: >> On 10/03/21 15:22, Peter Krempa wrote: >> > I've stumbled upon a regression with this patchset applied: >> > >> > error: internal error: process exited while connecting to monitor: >> > qemu-system-x86_64: -object

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Paolo Bonzini
On 11/03/21 09:45, Kevin Wolf wrote: I think it's only patch 29 and 30 that we would have to drop, actually. Unfortunately, that still removes one of the most immediately useful features, which is non-scalar properties for -object in the system emulator. But of course, a lot better than not

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Kevin Wolf
Am 11.03.2021 um 09:14 hat Paolo Bonzini geschrieben: > On 10/03/21 18:30, Kevin Wolf wrote: > > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > > > On 10/03/21 15:22, Peter Krempa wrote: > > > > I've stumbled upon a regression with this patchset applied: > > > > > > > > error: internal

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Kevin Wolf
Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: > > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > > > On 10/03/21 15:22, Peter Krempa wrote: > > [...] > > > The keyval parser would create a list if multiple values are

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Paolo Bonzini
On 11/03/21 08:47, Peter Krempa wrote: And for an interleaved list: -object memory-backend-ram,id=ram-node2,size=24578621440,host-nodes=1-2,host-nodes=5,host-nodes=7,policy=bind Uhm, I doubt this works? I would have expected "host-nodes=1-2,,5,,7" instead. Paolo

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Paolo Bonzini
On 10/03/21 18:30, Kevin Wolf wrote: Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: On 10/03/21 15:22, Peter Krempa wrote: I've stumbled upon a regression with this patchset applied: error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -object

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Peter Krempa
On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > > On 10/03/21 15:22, Peter Krempa wrote: [...] > The keyval parser would create a list if multiple values are given for > the same key. Some care needs to be taken to avoid mixing

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Kevin Wolf
Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > On 10/03/21 15:22, Peter Krempa wrote: > > I've stumbled upon a regression with this patchset applied: > > > > error: internal error: process exited while connecting to monitor: > > qemu-system-x86_64: -object > >

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Peter Krempa
On Wed, Mar 10, 2021 at 15:31:57 +0100, Paolo Bonzini wrote: > On 10/03/21 15:22, Peter Krempa wrote: > > I've stumbled upon a regression with this patchset applied: > > > > error: internal error: process exited while connecting to monitor: > > qemu-system-x86_64: -object > >

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Paolo Bonzini
On 10/03/21 15:22, Peter Krempa wrote: I've stumbled upon a regression with this patchset applied: error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -object memory-backend-ram,id=pc.ram,size=1048576000,host-nodes=0,policy=bind: Invalid parameter type for

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Peter Krempa
On Mon, Mar 08, 2021 at 17:54:10 +0100, Kevin Wolf wrote: > This series adds a QAPI type for the properties of all user creatable > QOM types and finally makes the --object command line option (in all > binaries) and the object-add monitor commands (in QMP and HMP) use the > new ObjectOptions

[PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-08 Thread Kevin Wolf
This series adds a QAPI type for the properties of all user creatable QOM types and finally makes the --object command line option (in all binaries) and the object-add monitor commands (in QMP and HMP) use the new ObjectOptions union. This change improves things in more than just one way: 1.