Miguel Di Ciurcio Filho <miguel.fi...@gmail.com> writes:

> Hi there,
>
> I've run QEMU like this:
>
> $ qemu -qmp tcp:localhost:3000,server,nowait -netdev 
> type=tap,id=ndev1,vhost=on
>
> Then I run these commands over QMP:
>
> works:
> {"execute": "device_add", "arguments": {"driver": "virtio-net-pci",
> "csum": "off", "id": "nic1", "netdev": "ndev1"}}
>
> works:
> {"execute": "device_add", "arguments": {"driver": "virtio-net-pci",
> "csum": false, "id": "nic1", "netdev": "ndev1"}}
>
> works, no error reported, csum stays "on":
> {"execute": "device_add", "arguments": {"driver": "virtio-net-pci",
> "csum": [ ], "id": "nic1", "netdev": "ndev1"}}
>
> works:
> {"execute": "device_add", "arguments": {"driver": "virtio-net-pci",
> "id": "nic1", "netdev": "ndev1", "vectors": "10"}}
>
> works:
> {"execute": "device_add", "arguments": {"driver": "virtio-net-pci",
> "id": "nic1", "netdev": "ndev1", "vectors": 10}}
>
> When specifying query-qdm I've faced this problem of internal QEMU
> types against json types. The mapped types need to be verified
> accordingly, IMHO.
>
> First we query for supported devices and get:
>
> {
>    "name":"virtio-net-pci",
>    "creatable":true,
>    "bus":"PCI",
>    "properties":[
>       {
>          "name":"vectors",
>          "type": { "qdev": "uint32", "qmp": "integer" }
>       },
>      ...
>     ]
> }
>
> And then this should result in an error:
> {"execute": "device_add", "arguments": {"driver": "virtio-net-pci",
> "id": "nic1", "netdev": "ndev1", "vectors": "10"}}

Yes.

This is where command line (QemuOpts), human monitor (args_type) and QMP
(QDict) meet.  Or rather collide.  It's a mess.  I can explain the gory
details, if anyone's interested.

Reply via email to