[Qemu-devel] [PATCH] fix endianess when changing memory with balloon.

2012-09-21 Thread Victor Toso
Signed-off-by: Victor Toso --- hw/virtio-balloon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index dd1a650..9e0cd88 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -193,12 +193,15 @@ static void

[Qemu-devel] ich6 and ich9 problem using spice with opus enable

2014-12-17 Thread Victor Toso
e at 48kHz but it is actually 44,1kHz. This was first reported in spice-devel [0] but it does look like a problem in the audio device. Any hints about this problem? [0] http://lists.freedesktop.org/archives/spice-devel/2014-November/017995.html -- ----- Victor Toso

Re: [Qemu-devel] [Qemu-block] QEMU being able to use audio cdroms

2015-12-09 Thread Victor Toso
r version of QEMU (1.7.2). It even has spice support. Not sure what changes are necessary to make it work upstream. You can check cdrom branches here [0] CCing Marc-Andre that sent the patches and Pavel which was working on rebasing this. [0] http://cgit.freedesktop.org/~pgrunt/ cheers, Victor Toso

Re: [Qemu-devel] [PATCH 00/51] audio 5.1 patches

2016-01-14 Thread Victor Toso
Hi, On Thu, Jan 14, 2016 at 02:45:13PM +0100, Kővágó, Zoltán wrote: > Hi, > > Sorry guys, I've disappeared for a while... But anyways, I've updated > my 5.1 audio patches to git master. > > About qapi flattening. That didn't really work last time, so now I've > modified OptsVisitor to support bo

[Qemu-devel] [Bug 1493033] [NEW] memory leak/high memory usage with spice webdav feature

2015-09-07 Thread Victor Toso
Public bug reported: This bug is being open due the comment: https://bugs.freedesktop.org/show_bug.cgi?id=91350#c9 Description of problem: When copying big files from client to guest, the memory usage in the host grows by about the size of the file. This is partially spice problem due the memory

[Qemu-devel] [Bug 1493033] Re: memory leak/high memory usage with spice webdav feature

2015-09-07 Thread Victor Toso
patches: http://lists.freedesktop.org/archives/spice- devel/2015-August/021644.html ** Attachment added: "massif-with-patches-v1-applyed.out" https://bugs.launchpad.net/qemu/+bug/1493033/+attachment/4458726/+files/massif-with-patches-v1-applyed.out -- You received this bug notification becau

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-06-27 Thread Victor Toso
Hi Markus, On Mon, Jun 27, 2022 at 09:15:53AM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > This is the second iteration of RFC v1: > > https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00226.html > > > > > > #

Re: [PATCH] schemas: add missing vim modeline

2022-01-27 Thread Victor Toso
On Thu, Jan 27, 2022 at 02:48:57PM +0100, Markus Armbruster wrote: > Alex Bennée writes: > > > Victor Toso writes: > > > >> Similar to f7160f3218 "schemas: Add vim modeline" > >> > >> Signed-off-by: Victor Toso > >> --- >

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 09:53:05AM +0100, Daniel P. Berrangé wrote: > > > * License > > > > > > While the generator (golang.py in this series) is GPL v2, the > > > > I'd make it v2+, just to express my displeasure with the decision to > > make the initial QAPI generator v2 only for no good re

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 10:32:49AM +0100, Daniel P. Berrangé wrote: > On Tue, May 10, 2022 at 10:18:15AM +0100, Daniel P. Berrangé wrote: > > On Tue, May 10, 2022 at 11:06:39AM +0200, Victor Toso wrote: > > > > > > generated code needs to be compatible

Re: [RFC PATCH v1 1/8] qapi: golang: Generate qapi's enum types in Go

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 11:06:16AM +0100, Daniel P. Berrangé wrote: > On Sat, Apr 02, 2022 at 12:40:57AM +0200, Victor Toso wrote: > > This patch handles QAPI enum types and generates its equivalent in Go. > > > > The highlights of this implementation are: > > &g

Re: [RFC PATCH v1 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 11:10:45AM +0100, Daniel P. Berrangé wrote: > On Sat, Apr 02, 2022 at 12:40:58AM +0200, Victor Toso wrote: > > This patch handles QAPI alternate types and generates data > > structures in Go that handles it. > > > > At this moment, there ar

Re: [RFC PATCH v1 1/8] qapi: golang: Generate qapi's enum types in Go

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 12:19:57PM +0100, Daniel P. Berrangé wrote: > > Marshalling does error if you try to convert an int that is not > > in the range of the enum type. > > > > Unmarshalling should not error in this case, but the field ends > > up not being set which defaults to 0 (in this

Re: [RFC PATCH v1 4/8] qapi: golang: Generate qapi's union types in Go

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 11:26:56AM +0100, Daniel P. Berrangé wrote: > On Sat, Apr 02, 2022 at 12:41:00AM +0200, Victor Toso wrote: > > This patch handles QAPI union types and generates the equivalent data > > structures and methods in Go to handle it. > > > > At

Re: [RFC PATCH v1 5/8] qapi: golang: Generate qapi's event types in Go

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 11:42:10AM +0100, Daniel P. Berrangé wrote: > On Sat, Apr 02, 2022 at 12:41:01AM +0200, Victor Toso wrote: > > This patch handles QAPI event types and generates data structures in > > Go that handles it. > > > > At the moment of th

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-10 Thread Victor Toso
Hi, On Tue, May 10, 2022 at 10:06:34AM +0200, Markus Armbruster wrote: > Victor Toso writes: > >> That's true, but at least to me the trade-off feels reasonable. > > > > I don't quite get the argument why it gets harder to find. We can > > simply pro

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-18 Thread Victor Toso
Hi, On Wed, May 11, 2022 at 04:50:35PM +0100, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 08:38:04AM -0700, Andrea Bolognani wrote: > > On Tue, May 10, 2022 at 01:51:05PM +0100, Daniel P. Berrangé wrote: > > > In 7.0.0 we can now generate > > > > > >type BlockResizeArguments struct { >

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-18 Thread Victor Toso
Hi, On Wed, May 11, 2022 at 04:17:35PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > Caller > > > > block_resize(device="dev0", size=1*GiB) > > block_resize(node_name="devnode0", size=1*GiB) > > > > > > In golang definition > > > >type BlockResizeArguments struct {

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-18 Thread Victor Toso
HI, On Wed, May 18, 2022 at 09:51:56AM +0100, Daniel P. Berrangé wrote: > On Wed, May 18, 2022 at 10:10:48AM +0200, Victor Toso wrote: > > Hi, > > > > On Wed, May 11, 2022 at 04:50:35PM +0100, Daniel P. Berrangé wrote: > > > On Wed, May 11, 2022 at 08:38:04AM

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-09 Thread Victor Toso
Hi! Sorry for taking some time to reply. On Tue, Apr 19, 2022 at 11:12:28AM -0700, Andrea Bolognani wrote: > On Sat, Apr 02, 2022 at 12:40:56AM +0200, Victor Toso wrote: > > Thanks for taking a look, let me know if you have questions, ideas > > or suggestions. > > Full di

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-09 Thread Victor Toso
Hi, Thanks for the quick review Markus. Sorry for taking quite a bit of time to get back to you. On Tue, Apr 26, 2022 at 01:14:28PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > Happy 1st April. Not a joke :) /* ugh, took me too long to send *

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-05-09 Thread Victor Toso
Hi, On Mon, May 02, 2022 at 10:01:41AM -0400, Andrea Bolognani wrote: > On Mon, May 02, 2022 at 01:46:23PM +0200, Markus Armbruster wrote: > > Andrea Bolognani writes: > > >> > The wire protocol would still retain the unappealing > > >> > name, but at least client libraries could hide the > > >>

Re: [PATCH 3/3] usbredir: avoid queuing hello packet on snapshot restore

2022-08-12 Thread Victor Toso
Hi, On Fri, Aug 12, 2022 at 06:10:31PM -0700, Joelle van Dyne wrote: > When launching QEMU with "-loadvm", usbredir_create_parser() should avoid > setting up the hello packet (just as with "-incoming". On the latest version > of libusbredir, usbredirparser_unserialize() will return error if the pa

Re: [PATCH 3/3] usbredir: avoid queuing hello packet on snapshot restore

2022-08-12 Thread Victor Toso
Hi, On Fri, Aug 12, 2022 at 10:33:54PM -0700, Joelle van Dyne wrote: > On Fri, Aug 12, 2022 at 10:30 PM Victor Toso wrote: > > > > Hi, > > > > On Fri, Aug 12, 2022 at 06:10:31PM -0700, Joelle van Dyne wrote: > > > When launching QEMU with "-loadv

Re: [PATCH 3/3] usbredir: avoid queuing hello packet on snapshot restore

2022-08-13 Thread Victor Toso
Hi, On Fri, Aug 12, 2022 at 10:57:08PM -0700, Joelle van Dyne wrote: > On Fri, Aug 12, 2022 at 10:50 PM Victor Toso wrote: > > > > Hi, > > > > On Fri, Aug 12, 2022 at 10:33:54PM -0700, Joelle van Dyne wrote: > > > On Fri, Aug 12, 2022 at 10:30 PM Victor To

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-08-17 Thread Victor Toso
gs that I think should be > changed, so for the time being I'm going to comment mostly on the > generated Go code and leave the details of the implementation for > later. Sure, and thanks. > On Fri, Jun 17, 2022 at 02:19:26PM +0200, Victor Toso wrote: > > This patch handles QA

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-08-17 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 08:46:34AM -0700, Andrea Bolognani wrote: > I've commented in detail to the single patches, just a couple of > additional points. > > On Fri, Jun 17, 2022 at 02:19:24PM +0200, Victor Toso wrote: > > * 7) Flat structs by removing embed types.

Re: [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-08-17 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 05:49:22PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 08:46:21AM -0700, Andrea Bolognani wrote: > > On Fri, Jun 17, 2022 at 02:19:31PM +0200, Victor Toso wrote: > > > +type EmptyCommandReturn struct { > > > +CommandI

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-08-17 Thread Victor Toso
Hi, On Wed, Jul 06, 2022 at 04:28:16AM -0500, Andrea Bolognani wrote: > On Tue, Jul 05, 2022 at 05:35:26PM +0100, Daniel P. Berrangé wrote: > > On Tue, Jul 05, 2022 at 08:45:30AM -0700, Andrea Bolognani wrote: > > > All this string manipulation looks sketchy. Is there some reason that > > > I'm no

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-08-17 Thread Victor Toso
On Wed, Jul 06, 2022 at 10:48:06AM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 06, 2022 at 10:37:54AM +0100, Daniel P. Berrangé wrote: > > On Wed, Jul 06, 2022 at 04:28:16AM -0500, Andrea Bolognani wrote: > > > You're right, that is undesirable. What about something like this? > > > > > > type

Re: [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-08-18 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 08:45:54AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:29PM +0200, Victor Toso wrote: > > This patch handles QAPI event types and generates data structures in > > Go that handles it. > > > > We also define a Event interfa

Re: [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-08-18 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 05:47:25PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 08:45:54AM -0700, Andrea Bolognani wrote: > > On Fri, Jun 17, 2022 at 02:19:29PM +0200, Victor Toso wrote: > > > This patch handles QAPI event types and generates data structure

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-08-18 Thread Victor Toso
Hi, On Mon, Jun 27, 2022 at 05:29:26PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi Markus, > > > > On Mon, Jun 27, 2022 at 09:15:53AM +0200, Markus Armbruster wrote: > >> Victor Toso writes: > >> > >> > Hi, > >>

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-08-19 Thread Victor Toso
Hi, On Wed, Aug 17, 2022 at 06:25:56PM +0200, Victor Toso wrote: > On Wed, Jul 06, 2022 at 10:48:06AM +0100, Daniel P. Berrangé wrote: > > On Wed, Jul 06, 2022 at 10:37:54AM +0100, Daniel P. Berrangé wrote: > > > On Wed, Jul 06, 2022 at 04:28:16AM -0500, Andrea Bolognani wro

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-08-21 Thread Victor Toso
Hi, On Fri, Aug 19, 2022 at 10:25:26AM -0500, Andrea Bolognani wrote: > > func (s QCryptoBlockOpenOptions) MarshalJSON() ([]byte, error) { > > var bytes []byte > > var err error > > if s.Qcow != nil { > > tmp := struct { > > QCryptoBlockOptionsQCow > >

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-08-22 Thread Victor Toso
Hi, On Fri, Aug 19, 2022 at 11:27:13AM -0500, Andrea Bolognani wrote: > On Wed, Aug 17, 2022 at 04:04:19PM +0200, Victor Toso wrote: > > On Tue, Jul 05, 2022 at 08:45:06AM -0700, Andrea Bolognani wrote: > > > On Fri, Jun 17, 2022 at 02:19:26PM +0200, Victor Toso wrot

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-08-29 Thread Victor Toso
Hi, On Mon, Aug 29, 2022 at 01:27:06PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > On Fri, Aug 19, 2022 at 11:27:13AM -0500, Andrea Bolognani wrote: > >> On Wed, Aug 17, 2022 at 04:04:19PM +0200, Victor Toso wrote: > >>

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-08-29 Thread Victor Toso
Hi, On Mon, Aug 29, 2022 at 01:53:51PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > On Tue, Jul 05, 2022 at 08:46:34AM -0700, Andrea Bolognani wrote: > >> I've commented in detail to the single patches, just a couple of > >&

[PATCH v1 02/16] qapi: fix example of query-vnc command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter in member "websocket" and it lacks it in "family" member. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 4 ++-- 1 file ch

[PATCH v1 01/16] qapi: fix example of query-ballon command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/mac

[PATCH v1 00/16] qapi examples fixes and rfc for another generator

2022-08-30 Thread Victor Toso
[0] https://lists.nongnu.org/archive/html/qemu-devel/2022-06/msg03105.html [1] https://gitlab.com/victortoso/qapi-go/-/tree/wip-v3/test [2] https://gitlab.com/qemu-project/python-qemu-qmp Cheers, Victor Victor Toso (16): qapi: fix example of query-ballon command qapi: fix example of query-v

[PATCH v1 14/16] qapi: fix example of query-migrate command

2022-08-30 Thread Victor Toso
The example's return type has several missing mandatory member names. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 56 + 1 file changed, 52 insertions(

[PATCH v1 04/16] qapi: fix example of query-rocker-of-dpa-flows command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter and a foreign comment format. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/rocker.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/q

[PATCH v1 08/16] qapi: fix example of NIC_RX_FILTER_CHANGED event

2022-08-30 Thread Victor Toso
Example output has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/net.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json

[PATCH v1 03/16] qapi: fix example of query-spice command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter and a foreign comment format. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi

[PATCH v1 15/16] qapi: fix examples of events missing timestamp

2022-08-30 Thread Victor Toso
I've used real timestamp and changing them one by one so they would not be all equal. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 27 +++ 1 file changed, 23 insertions(+), 4 dele

[PATCH v1 11/16] qapi: fix examples of blockdev-add with qcow2

2022-08-30 Thread Victor Toso
en using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/block-core.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index c038d9225d..dcc6d41494 100644 --- a/qapi/block-core.json +++ b/q

[PATCH v1 16/16] RFC: add a generator for qapi's examples

2022-08-30 Thread Victor Toso
"server": [ { "sequence-order": 2 "message-type": "return", "message": { "return": {} }, } ] } ] } If this idea seems reasonable, we can add python-qemu-qmp to validate each message at generation time already

[PATCH v1 06/16] qapi: fix example of query-blockstats command

2022-08-30 Thread Victor Toso
Example output is missing several ',' delimiter between members. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 32 1 file changed, 16 insertions(+

[PATCH v1 05/16] qapi: fix example of query-dump-guest-memory-capability command

2022-08-30 Thread Victor Toso
Example output is missing closing curly brackets. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/dump.json | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi/dump.json b/qapi/dump.json index 90859

[PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-08-30 Thread Victor Toso
The example output is setting optional member "backing" with null. This has no runtime impact. Remove it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/block-core.json | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v1 10/16] qapi: fix example of MEM_UNPLUG_ERROR event

2022-08-30 Thread Victor Toso
Example output was missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/mac

[PATCH v1 07/16] qapi: fix example of BLOCK_JOB_READY event

2022-08-30 Thread Victor Toso
Example output is missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/

[PATCH v1 13/16] qapi: fix example of query-hotpluggable-cpus command

2022-08-30 Thread Victor Toso
The example return type has the wrong member name. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/machine.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json

[PATCH v1 09/16] qapi: fix example of DEVICE_UNPLUG_GUEST_ERROR event

2022-08-30 Thread Victor Toso
Example output is missing a ',' delimiter and it has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/qdev.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) di

Re: [PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-08-31 Thread Victor Toso
Hi, On Wed, Aug 31, 2022 at 01:40:50PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > The example output is setting optional member "backing" with null. > > This has no runtime impact. Remove it. > > > > Problem was noticed when using the ex

Re: [PATCH v1 03/16] qapi: fix example of query-spice command

2022-08-31 Thread Victor Toso
Hi, On Wed, Aug 31, 2022 at 01:50:31PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Example output has an extra ',' delimiter and a foreign comment > > format. Fix it. > > > > Problem was noticed when trying to load the example into python&#

Re: [PATCH v1 16/16] RFC: add a generator for qapi's examples

2022-08-31 Thread Victor Toso
Hi, On Wed, Aug 31, 2022 at 02:01:54PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > The goal of this generator is to validate QAPI examples and transform > > them into a format that can be used for 3rd party applications to > > validate their QAPI/QMP in

Re: [PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-08-31 Thread Victor Toso
Hi, On Wed, Aug 31, 2022 at 03:16:54PM +0200, Markus Armbruster wrote: > Cc: Kevin for an improved chance of getting any nonsense I might write > corrected. > > Victor Toso writes: > > > Hi, > > > > On Wed, Aug 31, 2022 at 01:40:50PM +0200, Markus Armbruste

Re: [PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-09-01 Thread Victor Toso
Hi, First of all, I'm happy that this patch got us into this discussion. On Wed, Aug 31, 2022 at 04:53:49PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > On Wed, Aug 31, 2022 at 03:16:54PM +0200, Markus Armbruster wrote: > >> Cc: K

[PATCH v2 02/10] qapi: fix example of query-vnc command

2022-09-01 Thread Victor Toso
Example output has an extra ',' delimiter in member "websocket" and it lacks it in "family" member. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 4 ++-- 1 file ch

[PATCH v2 00/10] qapi examples fixes, simplified version

2022-09-01 Thread Victor Toso
FILTER_CHANGED event - qapi: fix example of query-dump-guest-memory-capability command * Dropped the generator (rfc) as I'll submit it again later, improved. Cheers, Victor Victor Toso (10): qapi: fix example of query-ballon command qapi: fix example of query-vnc command qapi: fix ex

[PATCH v2 01/10] qapi: fix example of query-ballon command

2022-09-01 Thread Victor Toso
Example output has an extra ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/mac

[PATCH v2 07/10] qapi: fix example of MEM_UNPLUG_ERROR event

2022-09-01 Thread Victor Toso
Example output was missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/mac

[PATCH v2 03/10] qapi: fix example of query-dump-guest-memory-capability command

2022-09-01 Thread Victor Toso
Example output is missing closing curly brackets. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/dump.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/dump.json b/qapi/dump.json

[PATCH v2 06/10] qapi: fix example of DEVICE_UNPLUG_GUEST_ERROR event

2022-09-01 Thread Victor Toso
Example output is missing a ',' delimiter and it has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/qdev.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) di

Re: [PATCH v1 16/16] RFC: add a generator for qapi's examples

2022-09-01 Thread Victor Toso
Hi, On Wed, Aug 31, 2022 at 04:57:20PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > On Wed, Aug 31, 2022 at 02:01:54PM +0200, Markus Armbruster wrote: > >> Victor Toso writes: > >> > >> > The goal of thi

[PATCH v2 09/10] qapi: fix example of query-hotpluggable-cpus command

2022-09-01 Thread Victor Toso
The example return type has the wrong member name. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/machine.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json

[PATCH v2 10/10] qapi: fix examples of events missing timestamp

2022-09-01 Thread Victor Toso
I've used real timestamp and changing them one by one so they would not be all equal. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 27 +++ 1 file changed, 23 insertions(+), 4 dele

[PATCH v2 08/10] qapi: fix examples of blockdev-add with qcow2

2022-09-01 Thread Victor Toso
en using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/block-core.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 882b266532..f21fa235f2 100644 --- a/qapi/block-core.json +++ b/q

[PATCH v2 04/10] qapi: fix example of BLOCK_JOB_READY event

2022-09-01 Thread Victor Toso
Example output is missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/

[PATCH v2 05/10] qapi: fix example of NIC_RX_FILTER_CHANGED event

2022-09-01 Thread Victor Toso
Example output has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/net.json | 1 - 1 file changed, 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json index 75ba2cb989..dd088

Re: [PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-09-02 Thread Victor Toso
Hi, On Thu, Sep 01, 2022 at 01:13:19PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Hi, > > > > First of all, I'm happy that this patch got us into this > > discussion. > > Me too! > > > On Wed, Aug 31, 2022 at 04:53:49PM +0200,

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-09-02 Thread Victor Toso
Hi, On Fri, Jun 17, 2022 at 02:19:26PM +0200, Victor Toso wrote: > This patch handles QAPI alternate types and generates data structures > in Go that handles it. > > At this moment, there are 5 alternates in qemu/qapi, they are: > * BlockDirtyBitmapMergeSource > *

Re: [PATCH] Revert "qapi: fix examples of blockdev-add with qcow2"

2022-10-04 Thread Victor Toso
gt; @BlockdevOptionsGenericCOWFormat > @BlockdevOptionsGenericCOWFormat > @BlockdevOptionsGenericFormat > However, it had already been merged then. Revert. > > Signed-off-by: Markus Armbruster Acked-by: Victor Toso > --- > qapi/block-core.json | 10 +- > 1 file changed, 5 inserti

Re: [PATCH] Revert "qapi: fix examples of blockdev-add with qcow2"

2022-10-04 Thread Victor Toso
Hi, On Tue, Oct 04, 2022 at 10:13:17AM +0200, Victor Toso wrote: > Hi, > > Sorry taking some time to reply. > > On Fri, Sep 30, 2022 at 07:19:08PM +0200, Markus Armbruster wrote: > > This reverts commit b6522938327141235b97ab38e40c6c4512587373. > > Which is: >

[RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-06-17 Thread Victor Toso
p":{"seconds":1588168529,"microseconds":201316},` + | `"data":{"id":"vm0","size":1073741824,"qom-path":"/machine/unattached/device[2]"}}` | e, err := UnmarshalEvent([]byte(input) | if err != nil { |

[RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-06-17 Thread Victor Toso
pi-go and victortoso/qemu I'm currently hosting the generated code from this RFCv2 at: https://gitlab.com/victortoso/qapi-go/-/tree/main/pkg/qapi This series can also be found at: https://gitlab.com/victortoso/qemu/-/commits/qapi-golang Thanks for taking a look, Victor Victor Toso (8):

[RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-06-17 Thread Victor Toso
uot;:"qcow2","data-file":"/some/place/my-image"}` | k := BlockdevRef{} | err := json.Unmarshal([]byte(input), &k) | if err != nil { | panic(err) | } | // *k.Definition.Qcow2.DataFile.Reference == "/some/place/my-image" Signed-off-by: Victor Toso

[RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-06-17 Thread Victor Toso
;SetPasswordOptionsVnc' } } go: | type SetPasswordOptions struct { | // Base fields | Password string `json:"password"` | Connected *SetPasswordAction `json:"connected,omitempty"` | | // Variants fields | Vnc *SetPasswordOptionsVnc

[RFC PATCH v2 1/8] qapi: golang: Generate qapi's enum types in Go

2022-06-17 Thread Victor Toso
| DisplayProtocolVnc DisplayProtocol = "vnc" | DisplayProtocolSpice DisplayProtocol = "spice" | ) Signed-off-by: Victor Toso --- scripts/qapi/golang.py | 134 + scripts/qapi/main.py | 2 + 2 files changed, 136 insertions(+) create m

[RFC PATCH v2 8/8] qapi: golang: document skip function visit_array_types

2022-06-17 Thread Victor Toso
Signed-off-by: Victor Toso --- scripts/qapi/golang.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/golang.py b/scripts/qapi/golang.py index ab91cf124f..f37014f52b 100644 --- a/scripts/qapi/golang.py +++ b/scripts/qapi/golang.py @@ -410,7 +410,12 @@ def

[RFC PATCH v2 3/8] qapi: golang: Generate qapi's struct types in Go

2022-06-17 Thread Victor Toso
t;` | Size uint64`json:"size"` | Preallocation *PreallocMode `json:"preallocation,omitempty"` | Nocow *bool `json:"nocow,omitempty"` | ExtentSizeHint *uint64 `json:"extent-size-hint,omitempty"

[RFC PATCH v2 6/8] qapi: golang: Generate qapi's command types in Go

2022-06-17 Thread Victor Toso
"` | } usage: | input := `{"execute":"set_password",` + | `"arguments":{"protocol":"vnc","password":"secret"}}` | c, err := UnmarshalCommand([]byte(input)) | if err != nil { | panic(err) | } | if c.GetName

[RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-06-17 Thread Victor Toso
g",` + |`"handle" : 1 } } ` | ret := QuerySevCommandReturn{} | err := json.Unmarshal([]byte(input), &ret) | if ret.Error != nil { | // Handle command failure {"error": { ...}} | } else if ret.Result != nil { | // ret.Resul

Re: [RFC PATCH v2 3/8] qapi: golang: Generate qapi's struct types in Go

2022-06-17 Thread Victor Toso
Hi, On Fri, Jun 17, 2022 at 03:41:10PM +0100, Daniel P. Berrangé wrote: > On Fri, Jun 17, 2022 at 02:19:27PM +0200, Victor Toso wrote: > > This patch handles QAPI struct types and generates the equivalent > > types in Go. > > > > At the time of this writing,

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-06-01 Thread Victor Toso
Hi, On Wed, May 25, 2022 at 08:49:19AM -0500, Andrea Bolognani wrote: > On Wed, May 18, 2022 at 02:30:11PM +0200, Markus Armbruster wrote: > > Victor Toso writes: > > > IMHO, at this moment, qapi-go is targeting communicating with > > > QEMU and handling multiple QEM

[PATCH 07/14] qapi: fix example of UNPLUG_PRIMARY event

2022-03-24 Thread Victor Toso
* Timestamp is not optional, let's add for completeness. * Add '<-' to signalize it is receiving the data * Break likes like most of examples do Signed-off-by: Victor Toso --- qapi/migration.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qapi/mig

[PATCH 01/14] qapi: BlockExportRemoveMode: move comments to TODO

2022-03-24 Thread Victor Toso
@hide and @soft are potential additions which fits the TODO section perfectly. The main motivation is to avoid this whole block of comment entering the wrong section in the python parser. Signed-off-by: Victor Toso --- qapi/block-export.json | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 04/14] qapi: fix example of BLOCK_JOB_PENDING event

2022-03-24 Thread Victor Toso
* Event's name: BLOCK_JOB_WAITING -> BLOCK_JOB_PENDING * Argument device -> id Signed-off-by: Victor Toso --- qapi/block-core.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 5b6c069dd9..ea96e1b009 100644

[PATCH 05/14] qapi: fix example of DUMP_COMPLETED event

2022-03-24 Thread Victor Toso
* Timestamp is not optional, let's add for completeness. * Add '<-' to signalize it is receiving the data * While at it, add extra space before "result" and "total" Signed-off-by: Victor Toso --- qapi/dump.json | 7 --- 1 file changed, 4 insertions

[PATCH 09/14] qapi: run-state examples: add missing member

2022-03-24 Thread Victor Toso
As reason member in not optional. Signed-off-by: Victor Toso --- qapi/run-state.json | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qapi/run-state.json b/qapi/run-state.json index 43d66d700f..1b9f64c9cd 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json

[PATCH 14/14] qapi: fix example of dump-guest-memory

2022-03-24 Thread Victor Toso
The member "paging" is not optional Signed-off-by: Victor Toso --- qapi/dump.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/dump.json b/qapi/dump.json index d3ed79e8cd..0873f16e5c 100644 --- a/qapi/dump.json +++ b/qapi/dump.json @@ -83,7 +83,7 @@

[PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event

2022-03-24 Thread Victor Toso
Reason is not optional. Signed-off-by: Victor Toso --- qapi/block-core.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 585a9e020e..5b6c069dd9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -5059,7

[PATCH 13/14] qapi: fix example of ACPI_DEVICE_OST event

2022-03-24 Thread Victor Toso
* Missing the timestamp * Missing the "info" object in the "data" member Signed-off-by: Victor Toso --- qapi/acpi.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qapi/acpi.json b/qapi/acpi.json index 51f0d55db7..d148f6db9f 100644 --- a/qapi/

[PATCH 12/14] qapi: ui examples: add missing websocket member

2022-03-24 Thread Victor Toso
As the websocket is not optional in VncBasicInfo. Signed-off-by: Victor Toso --- qapi/ui.json | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index 664da9e462..a810ed680c 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -710,10 +710,10

[PATCH 00/14] Fix some qapi examples and a TODO section

2022-03-24 Thread Victor Toso
Hi, I've being using the examples as unit tests and found a few that doesn't work out-of-the-box, might be inteded in order to be less verbose in the qapi documentation but nevertheless I'm sending this out in case you want to cherry-pick them. Cheers, Victor To

[PATCH 06/14] qapi: fix example of MEMORY_DEVICE_SIZE_CHANGE event

2022-03-24 Thread Victor Toso
* qom-path is not optional Signed-off-by: Victor Toso --- qapi/machine.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 42fc68403d..9c460ec450 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1356,7 +1356,8

[PATCH 08/14] qapi: fix example of FAILOVER_NEGOTIATED event

2022-03-24 Thread Victor Toso
* Data is an object, not a string. It generates a qdict. * Timestamp is not optional, let's add for completeness. Signed-off-by: Victor Toso --- qapi/net.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json index 7fab2e7cd8..82c0d9e778 1

[PATCH 02/14] qapi: fix example of BLOCK_IMAGE_CORRUPTED event

2022-03-24 Thread Victor Toso
Fatal is not optional. Signed-off-by: Victor Toso --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index e89f2dfb5b..585a9e020e 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -5008,7 +5008,7

  1   2   3   >