Re: [Qemu-devel] ivshmem property size should be a size, not a string

2015-11-24 Thread Marc-André Lureau
onable split between frontend and backend. If we > kept x-memdev, drop it from the deprecated device. > >> Imho it's not such a big deal to have a compatibility interface with >> 2.5 in the future, and I would rather keep the consistant behaviour >> for the error return case. > > The fewer compatibility interfaces we maintain, and the simpler they > are, the better. I don't see why we must complicate this one before we > deprecate it when we can it the other way round. I am just saying I am okay with this extra property. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH for-2.5 3/5] tests/ivshmem-test: Supply missing initializer in get_device()

2015-11-24 Thread Marc-André Lureau
- Original Message - > If the device isn't found, the assertion uses dev without > initialization. Fix that. > > Signed-off-by: Markus Armbruster my bad :) Reviewed-by: Marc-André Lureau > --- > tests/ivshmem-test.c | 1 + > 1 file changed, 1 insertion(

Re: [Qemu-devel] [PATCH for-2.5 2/5] qemu-doc: Fix ivshmem usage example with shm=...

2015-11-24 Thread Marc-André Lureau
- Original Message - > The example suggests you can omit "shm". This isn't true; you must > specify exactly one of "shm", "chardev", "memdev". Fix it. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau >

Re: [Qemu-devel] [PATCH for-2.5 4/5] ivshmem: Mark questionable socket type test FIXME

2015-11-24 Thread Marc-André Lureau
/* FIXME replace this test, it works basically by chance */ I wouldn't say it like that, but ack anyway. Reviewed-by: Marc-André Lureau > if (strncmp(s->server_chr->filename, "unix:", 5)) { > error_setg(errp, "chardev is not a unix client socket"); > return; > -- > 2.4.3 > >

Re: [Qemu-devel] [PATCH for-2.5 1/5] qemu-doc: Fix ivshmem example markup

2015-11-24 Thread Marc-André Lureau
- Original Message - > Use @var{foo} like we do everywhere else, not . > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > qemu-doc.texi | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/qemu-doc.texi

Re: [Qemu-devel] [PATCH for-2.5 5/5] ivshmem: Rename property memdev to x-memdev for 2.5

2015-11-24 Thread Marc-André Lureau
; > To avoid adding more baggage to the soon-to-be-deprecated interface, > mark property "memdev" as experimental, by renaming it to "x-memdev". > It's the only recent user interface change. Sounds good to me, Reviewed-by: Marc-André Lureau > > Si

Re: [Qemu-devel] [PATCH for-2.5 4/5] ivshmem: Mark questionable socket type test FIXME

2015-11-24 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > - Original Message - > >> Signed-off-by: Markus Armbruster > >> --- > >> hw/misc/ivshmem.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> dif

Re: [Qemu-devel] [PATCH 1/2] qga: flush implicitely when needed

2015-11-24 Thread Marc-André Lureau
Hi - Original Message - > On 11/24/2015 09:34 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > In the subject: s/implicitely/implicitly/ if you are fixing the typo, or > s/implicitely/explicitly/ if you are trying to make it match what the >

Re: [Qemu-devel] [PATCH 2/2] tests: add file-write-read test

2015-11-24 Thread Marc-André Lureau
Hi - Original Message - > On 11/24/2015 09:34 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > This test exhibits a POSIX behaviour regarding switching between write > > and read. It's undefined result if the application doesn&

Re: [Qemu-devel] [PATCH for-2.5 4/5] ivshmem: Mark questionable socket type test FIXME

2015-11-24 Thread Marc-André Lureau
- Original Message - > Marc-André Lureau writes: > > > Hi > > > > - Original Message - > >> Marc-André Lureau writes: > >> > >> > - Original Message - > >> >> Signed-off-by: Markus Armbruster &g

Re: [Qemu-devel] [PATCH for-2.5] qga: Better mapping of SEEK_* in guest-file-seek

2015-11-24 Thread Marc-André Lureau
PRId64 ", " >" 'offset': %d, 'whence': %d } }", > - id, 6, SEEK_SET); > + id, 6, 0); > ret = qmp_fd(fixture->fd, cmd); > qmp_assert_no_error(ret); > val = qdict_get_qdict(ret, "return"); > > With that fix, Reviewed-by: Marc-André Lureau thanks -- Marc-André Lureau

Re: [Qemu-devel] [PATCH for-2.5 4/5] ivshmem: Mark questionable socket type test FIXME

2015-11-25 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > - Original Message ----- > >> Marc-André Lureau writes: > >> > >> > Hi > >> > > >> > - Original Message - > >> >> Marc-André Lureau

Re: [Qemu-devel] [PATCH v3 0/2] qga: flush explicitly when needed

2015-11-25 Thread Marc-André Lureau
Hi - Original Message - > Quoting marcandre.lur...@redhat.com (2015-11-25 06:59:10) > > From: Marc-André Lureau > > > > Without this change, a write() followed by a read() may lose the > > previously written content, as shown in the following test. > >

Re: [Qemu-devel] [PATCH] Keep pty slave file descriptor open until the master is closed

2016-02-11 Thread Marc-André Lureau
y,id=charserial0 -device isa-serial,chardev=charserial0. I forgot a lot about how pty/pts work, and reading some man pages didn't help me much to understand the issue, I would suggest to revert it until a better solution is found. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] Keep pty slave file descriptor open until the master is closed

2016-02-12 Thread Marc-André Lureau
Hi On Fri, Feb 12, 2016 at 3:29 AM, Marc-André Lureau wrote: > Hi > > On Mon, Jan 11, 2016 at 10:13 AM, Paolo Bonzini wrote: >> >> >> On 11/01/2016 09:33, Michael Tokarev wrote: >>> 11.12.2015 14:29, Ashley Jonathan wrote: >>>> I have experienced

Re: [Qemu-devel] [PATCH v2] monitor: spelling fix

2016-02-17 Thread Marc-André Lureau
adding trivial to cc On Mon, Jan 18, 2016 at 2:25 PM, wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Reviewed-by: Markus Armbruster > Reviewed-by: Luiz Capitulino > --- > monitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Qemu-devel] [PATCH for-2.5 3/3] vhost-user-test: fix crash with glib < 2.36

2015-11-30 Thread Marc-André Lureau
- Original Message - > On Fri, Nov 27, 2015 at 03:41:20PM +0100, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > The prepare callback needs to be implemented with glib < 2.36. > > > > Signed-off-by: Marc-André Lurea

Re: [Qemu-devel] [PATCH] vhost-user-test: fix crash with glib < 2.36

2015-11-30 Thread Marc-André Lureau
ility, not strictly required to fix the issue. > Reported-by: Marc-André Lureau > Signed-off-by: Michael S. Tsirkin > --- > tests/vhost-user-test.c | 13 + > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/tests/vhost-user-test.c b/tests/vhost-us

Re: [Qemu-devel] [PATCH for-2.5 3/3] vhost-user-test: fix crash with glib < 2.36

2015-11-30 Thread Marc-André Lureau
On Mon, Nov 30, 2015 at 12:00 PM, Marc-André Lureau wrote: > I don't follow what is the mess here. Ah ok, I get it, I forgot the #else NULL. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH for-2.5 3/3] vhost-user-test: fix crash with glib < 2.36

2015-11-30 Thread Marc-André Lureau
On Mon, Nov 30, 2015 at 2:09 PM, Michael S. Tsirkin wrote: > On Mon, Nov 30, 2015 at 06:00:29AM -0500, Marc-André Lureau wrote: >> >> >> - Original Message - >> > On Fri, Nov 27, 2015 at 03:41:20PM +0100, marcandre.lur...@redhat.com >> >

Re: [Qemu-devel] [PATCH for-2.5 v3 0/3] vhost-user-test fixes

2015-11-30 Thread Marc-André Lureau
(sorry v3, git-publish don't mix well --subject-prefix and the versioning) - Original Message - > From: Marc-André Lureau > > This series fixes a number of races and crashes on glib < 2.36 > (with Travis build for ex). > > v2->v3: > - quote glib documen

Re: [Qemu-devel] [PATCH for-2.5 v3 0/3] vhost-user-test fixes

2015-11-30 Thread Marc-André Lureau
ong as kvm is enabled. However, while looking into this, I found a similar issue when x86 target is missing. I just sent patch. > I was struggling to find any notes on running individual tests in the > docs. Did you find something about it? -- Marc-André Lureau

Re: [Qemu-devel] [PATCH for-2.5 v4 4/4] tests: add vhost-user-test when target is x64 only

2015-12-01 Thread Marc-André Lureau
Hi - Original Message - > > diff --git a/tests/Makefile b/tests/Makefile > > index 0ef00a1..cf1228b 100644 > > --- a/tests/Makefile > > +++ b/tests/Makefile > > @@ -198,13 +198,13 @@ check-qtest-i386-y += tests/pc-cpu-test$(EXESUF) > > check-qtest-i386-y += tests/q35-test$(EXESUF) > > gc

Re: [Qemu-devel] [PATCH] tests/vhost-user-test: Fix potential use-after-free

2015-12-02 Thread Marc-André Lureau
Hi - Original Message - > ae31fb5 "vhost-user-test: wrap server in TestServer struct" cleaned up > the handling of the test server in vhost-user-test. Unfortunately it > introduced a subtle use-after-free if a race goes the wrong way. > > When the server structure is freed inside test_se

Re: [Qemu-devel] [PATCH] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-04 Thread Marc-André Lureau
> diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h > index 7115154..9ca659a 100644 > --- a/include/exec/ram_addr.h > +++ b/include/exec/ram_addr.h > @@ -72,6 +72,7 @@ ram_addr_t qemu_ram_alloc_resizeable(ram_addr_t size, > ram_addr_t max_size, > void *host), > MemoryRegion *mr, Error **errp); > int qemu_get_ram_fd(ram_addr_t addr); > +void qemu_set_ram_fd(ram_addr_t addr, int fd); > void *qemu_get_ram_block_host_ptr(ram_addr_t addr); > void *qemu_get_ram_ptr(ram_addr_t addr); > void qemu_ram_free(ram_addr_t addr); > -- > 2.1.4 > > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-07 Thread Marc-André Lureau
know about the limitations here. Is this extra offset really worth saving? Finally, I wonder what qemu is really doing in the end ;) Michael, could you comment about this vhost-user use case? (see above linked thread) -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 1/3] char: fix vhost-user socket full

2015-12-07 Thread Marc-André Lureau
; + This looks reasonable to me. However, I don't know what happens with partial write of ancillary data. Hopefully it's all or nothing. Apparently, reading unix_stream_sendmsg() in kernel shows that as long as a few bytes have been sent, the ancillary data is sent. So it looks like it still do

Re: [Qemu-devel] [PATCH 2/3] virtio-pci: add an option to bypass guest_notifier_mask

2015-12-07 Thread Marc-André Lureau
e), > +DEFINE_PROP_BIT("usenotifiermask", VirtIOPCIProxy, flags, > +VIRTIO_PCI_FLAG_USE_NOTIFIERMASK_BIT, true), > DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3), > DEFINE_PROP_END_OF_LIST(), > }; > diff --git a/hw/vi

Re: [Qemu-devel] [PATCH 2/3] virtio-pci: add an option to bypass guest_notifier_mask

2015-12-07 Thread Marc-André Lureau
Hi On Mon, Dec 7, 2015 at 2:37 PM, Marc-André Lureau wrote: > Hi > > On Thu, Dec 3, 2015 at 10:53 AM, Didier Pallard > wrote: >> Using guest_notifier_mask function in vhost-user case may >> break interrupt mask paradigm, because mask/unmask is not >> r

Re: [Qemu-devel] [PATCH] configure: remove bashism (since 2010)

2015-12-09 Thread Marc-André Lureau
Hi On Thu, Dec 10, 2015 at 1:53 AM, wrote: > From: Marc-André Lureau > > "type" is not POSIX shell, but a bashism. (found thanks to shellcheck) > A subsidiary question is whether qemu really care about using POSIX shell, or we can just depend on bashism. That would help

Re: [Qemu-devel] [PATCH] configure: remove bashism (since 2010)

2015-12-10 Thread Marc-André Lureau
Hi On Thu, Dec 10, 2015 at 3:51 AM, Eric Blake wrote: > On 12/09/2015 05:53 PM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> "type" is not POSIX shell, but a bashism. (found thanks to shellcheck) > > NACK. 'type&#x

Re: [Qemu-devel] [PATCH 6/6] virtio-gpu: block any rendering until client (ui) is done

2016-01-13 Thread Marc-André Lureau
091..7249fcd 100644 > --- a/include/hw/virtio/virtio-gpu.h > +++ b/include/hw/virtio/virtio-gpu.h > @@ -107,6 +107,7 @@ typedef struct VirtIOGPU { > > bool use_virgl_renderer; > bool renderer_inited; > +bool renderer_blocked; > QEMUTimer *fence_poll; > QEMUTimer *print_stats; > > -- > 1.8.3.1 > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 1/6] zap qemu_egl_has_ext in include/ui/egl-helpers.h

2016-01-13 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau On Wed, Jan 13, 2016 at 1:02 PM, Gerd Hoffmann wrote: > Drop leftover prototype which sneaked in by mistake > > Signed-off-by: Gerd Hoffmann > --- > include/ui/egl-helpers.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/in

Re: [Qemu-devel] [PATCH 2/6] console: block rendering until client is done

2016-01-13 Thread Marc-André Lureau
er process (spice will do that). > > Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau > --- > include/ui/console.h | 2 ++ > ui/console.c | 10 ++ > 2 files changed, 12 insertions(+) > > diff --git a/include/ui/console.h b/include/ui/console.

Re: [Qemu-devel] [PATCH 3/6] virtio-gpu: fix memory leak in error path

2016-01-13 Thread Marc-André Lureau
Hi On Wed, Jan 13, 2016 at 1:02 PM, Gerd Hoffmann wrote: > Found by Coverity Scan, buf not freed on error. > > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Marc-André Lureau > hw/display/virtio-gpu-3d.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

Re: [Qemu-devel] [PATCH 4/6] virtio-gpu: maintain command queue

2016-01-13 Thread Marc-André Lureau
->reslist); > +QTAILQ_INIT(&g->cmdq); > QTAILQ_INIT(&g->fenceq); > > g->enabled_output_bitmask = 1; > diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h > index 9b279d7..f7e7a52 100644 > --- a/include/hw/virtio/virtio-gpu.h > +++ b/include/hw/virtio/virtio-gpu.h > @@ -94,6 +94,7 @@ typedef struct VirtIOGPU { > DeviceState *qdev; > > QTAILQ_HEAD(, virtio_gpu_simple_resource) reslist; > +QTAILQ_HEAD(, virtio_gpu_ctrl_command) cmdq; > QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq; > > struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUT]; > -- > 1.8.3.1 > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 5/6] virtio-gpu: add support to enable/disable command processing

2016-01-13 Thread Marc-André Lureau
Hi On Wed, Jan 13, 2016 at 1:02 PM, Gerd Hoffmann wrote: > So we can stop rendering for a while in case we have to. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau > --- > hw/display/virtio-gpu-3d.c | 3 ++- > hw/display/virtio-gpu.c| 5 - &g

Re: [Qemu-devel] [PATCH v2 0/2] qga: guest-set-user-password - added ability to create new user

2016-01-14 Thread Marc-André Lureau
t-user-password - added ability to create new user > > qga/commands-posix.c | 215 > +-- > qga/commands-win32.c | 25 +- > qga/qapi-schema.json | 5 +- > 3 files changed, 186 insertions(+), 59 deletions(-) > > -- > 2.1.4 > > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] hw/misc: slavepci_passthru driver

2016-01-18 Thread Marc-André Lureau
Hi - Original Message - > Hi there, > > I'd like to submit this new pci driver ( hw/misc )for inclusion, > if you think it could be useful to other as well as ourself. > > The driver "worked for our needs" BUT we haven't done extensive > testing and this is our first attempt to submit a

Re: [Qemu-devel] [PATCH] ccid: use libcacard.h from 2.5.1

2015-12-18 Thread Marc-André Lureau
Hi - Original Message - > > > On 18/12/2015 10:49, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > This cleans up a bit libcacard headers inclusion. > > > > Signed-off-by: Marc-André Lureau > > --- > > confi

Re: [Qemu-devel] [Bug 1529859] [NEW] qemu 2.5.0 ivshmem segfault with msi=off option

2016-01-04 Thread Marc-André Lureau
s_feature(s, IVSHMEM_MSI)) { >> -msix_uninit_exclusive_bar(dev); >> +msix_uninit_exclusive_bar(dev); > > I can't see what's changing here. Whitespace? > >> } >> - >> -g_free(s->msi_vectors); >> + >> +if(s->msi_vectors) >> + g_free(s->msi_vectors); > > This hunk is bogus. g_free(NULL) already works properly. > > -- > Eric Blake eblake redhat com+1-919-301-3266 > Libvirt virtualization library http://libvirt.org > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 31/35] qapi: Rework deallocation of partial struct

2016-01-05 Thread Marc-André Lureau
6 @@ void visit_type_BlockdevOptions(Visitor > | out_obj: > | error_propagate(errp, err); > | err = NULL; > |- if (*obj) { > |-visit_end_union(v, !!(*obj)->u.data, &err); > |-} > |-error_propagate(errp, err); > |-err = NULL; > | visit_end_struct(v, &err); > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 29/35] qapi: Canonicalize missing object to :empty

2016-01-05 Thread Marc-André Lureau
because it is also called for alternates (which have no > base). > > No change to generated code. > > Signed-off-by: Eric Blake > Looks all good to me, but will let Markus check if that makes sense. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 28/35] qapi: Eliminate empty visit_type_FOO_fields

2016-01-05 Thread Marc-André Lureau
gt; > Another reason for doing this optimization is that it gets us > closer to merging the code for visiting structs and unions: > since flat unions have no local members, they do not need to > have a visit_type_UNION_fields() emitted, even when they start > sharing the code used to visit structs. > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 30/35] qapi-visit: Unify struct and union visit

2016-01-05 Thread Marc-André Lureau
{ > | Error *err = NULL; > |@@ -2319,7 +2332,7 @@ void visit_type_ChardevBackend(Visitor * > | if (!*obj) { > | goto out_obj; > | } > |-visit_type_ChardevBackendKind(v, "type", &(*obj)->type, &err); > |+visit_type_ChardevBackend_fields(v, obj, &err); > | if (err) { > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 27/35] qapi: Fix command with named empty argument type

2016-01-05 Thread Marc-André Lureau
tests/test-qmp-marshal.c:264:14: error: variable ‘v’ set but not used > [-Werror=unused-but-set-variable] > Visitor *v; > ^ > > Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 18/35] qapi: Drop unused error argument for list and implicit struct

2016-01-05 Thread Marc-André Lureau
igned-off-by: Eric Blake > This patch makes visit_end_list() possibly abort, while before it would pass the error to upper. I assume that's what you are going to change next. Reviewed-by: Marc-André Lureau > --- > v8: no change > v7: place earlier in series, rebase to earlier

Re: [Qemu-devel] [PATCH v8 23/35] qmp: Tighten output visitor rules

2016-01-05 Thread Marc-André Lureau
tic void > test_visitor_out_struct_errors(TestOutputVisitorData *data, > visit_type_UserDefOne(data->ov, "unused", &pu, &err); > g_assert(err); > error_free(err); > +qmp_output_visitor_reset(data->qov); > } > } > > @@ -459,6 +460,7 @@ static void test_visitor_out_empty(TestOutputVisitorData > *data, > { > QObject *arg; > > +visit_type_null(data->ov, NULL, &error_abort); I guess this is going to be used outside of just this artificial case. Otherwise, I would have suggested to get rid of it. > arg = qmp_output_get_qobject(data->qov); > g_assert(qobject_type(arg) == QTYPE_QNULL); > /* Check that qnull reference counting is sane */ > -- > 2.4.3 > > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 17/35] qapi: Drop unused 'kind' for struct/enum visit

2016-01-05 Thread Marc-André Lureau
t that right). But nothing ever used the argument. > It's even hard to argue that it would be useful in a debugger, > as a stack backtrace also tells which type is being visited. > > Therefore, drop the 'kind' argument as dead. > > Signed-off-by: Eric Blake > Soun

Re: [Qemu-devel] [PATCH v8 20/35] qmp: Don't abuse stack to track qmp-output root

2016-01-05 Thread Marc-André Lureau
ings in the > stack. Drop the now-useless qmp_output_first() while at it. > > Saved for a later patch: we still are rather sloppy in that > qmp_output_get_object() can be called in the middle of a parse, > rather than requiring that a visit is complete. > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 26/35] qapi: Add type.is_empty() helper

2016-01-05 Thread Marc-André Lureau
no longer be sufficient. More > immediately, the new .is_empty() helper will help fix a bug in > qapi-visit. > which bug? (I guess it's related to the next patch) -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 16/35] qapi: Swap 'name' in visit_* callbacks to match public API

2016-01-05 Thread Marc-André Lureau
doing this one all by hand. Now all the visitor callbacks match > the main interface. > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 13/35] qom: Use typedef for Visitor

2016-01-05 Thread Marc-André Lureau
d with a Visitor. > > Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 22/35] qapi: Add visit_type_null() visitor

2016-01-05 Thread Marc-André Lureau
tput visitor. > > Signed-off-by: Eric Blake > overall looks good to me: Reviewed-by: Marc-André Lureau Just a small remark below, > --- > v8: rebase to 'name' motion > v7: new patch, based on discussion about spapr_drc.c > --- > include/qapi/visitor-impl.h |

Re: [Qemu-devel] [PATCH v8 25/35] qapi: Simplify excess input reporting in input visitors

2016-01-05 Thread Marc-André Lureau
e hash table. But if all we > need is an arbitrary entry, we can get that from a single-use > iterator, without needing a tautological callback function. > > Suggested-by: Markus Armbruster > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 07/35] qapi: Improve generated event use of qapi visitor

2016-01-05 Thread Marc-André Lureau
bers, prefix='', need_cast=False, skiperr=False): > +def gen_visit_fields(members, prefix='', need_cast=False, skiperr=False, > + label='out'): > ret = '' > if skiperr: > errparg = 'NULL' > @@ -16

Re: [Qemu-devel] [PATCH v8 03/35] qapi: Drop dead dealloc visitor variable

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Commit 0b9d8542 added StackEntry.is_list_head, but forgot to > delete the now-unused QapiDeallocVisitor.is_list_head. > > Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 19/35] qmp: Fix reference-counting of qnull on empty output visit

2016-01-05 Thread Marc-André Lureau
if (obj) { > qobject_incref(obj); > +} else { > +obj = qnull(); > } > return obj; > } > diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c > index 4df94bc..26dc752 100644 > --- a/tests/test-qmp-output-visitor.c > +++ b/tests/test-qmp-output-visitor.c > @@ -461,6 +461,8 @@ static void test_visitor_out_empty(TestOutputVisitorData > *data, > > arg = qmp_output_get_qobject(data->qov); > g_assert(qobject_type(arg) == QTYPE_QNULL); > +/* Check that qnull reference counting is sane */ > +g_assert(arg->refcnt == 2); > qobject_decref(arg); > } Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 21/35] qapi: Document visitor interfaces, add assertions

2016-01-05 Thread Marc-André Lureau
_enum() callback). > > Signed-off-by: Eric Blake Nice doc, Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 01/35] qobject: Document more shortcomings in our number handling

2016-01-05 Thread Marc-André Lureau
> Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 09/35] qapi: Prefer type_int64 over type_int in visitors

2016-01-05 Thread Marc-André Lureau
>visitor.type_enum = input_type_enum; > -v->visitor.type_int = parse_type_int; > +v->visitor.type_int64 = parse_type_int64; > v->visitor.type_size = parse_type_size; > v->visitor.type_bool = parse_type_bool; > v->visitor.type_str = parse_type_str; > diff --git a/qapi/string-output-visitor.c b/qapi/string-output-visitor.c > index 202764c..c0a9331 100644 > --- a/qapi/string-output-visitor.c > +++ b/qapi/string-output-visitor.c > @@ -121,8 +121,8 @@ static void format_string(StringOutputVisitor *sov, Range > *r, bool next, > } > } > > -static void print_type_int(Visitor *v, int64_t *obj, const char *name, > - Error **errp) > +static void print_type_int64(Visitor *v, int64_t *obj, const char *name, > + Error **errp) > { > StringOutputVisitor *sov = to_sov(v); > GList *l; > @@ -345,7 +345,7 @@ StringOutputVisitor *string_output_visitor_new(bool human) > v->string = g_string_new(NULL); > v->human = human; > v->visitor.type_enum = output_type_enum; > -v->visitor.type_int = print_type_int; > +v->visitor.type_int64 = print_type_int64; > v->visitor.type_size = print_type_size; > v->visitor.type_bool = print_type_bool; > v->visitor.type_str = print_type_str; > -- > 2.4.3 > > Anyhow, this patch is a welcome cleanup to me: Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 08/35] qapi: Track all failures between visit_start/stop

2016-01-05 Thread Marc-André Lureau
take action based > on whether an error has occurred, which requires us to track > all actions through a local err. Rewrite the visits to be > more in line with the other generated calls. > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 11/35] qapi: Consolidate visitor small integer callbacks

2016-01-05 Thread Marc-André Lureau
null", "int16_t"); > -return; > -} > -*obj = value; > -} > +int64_t value = *obj; > +visit_type_intN(v, &value, name, INT16_MIN, INT16_MAX, "int16_t", errp); > +*obj = value; > } > > void visit_type_int32(Visitor *v, int32_t *obj, const char *name, Error > **errp) > { > -int64_t value; > - > -if (v->type_int32) { > -v->type_int32(v, obj, name, errp); > -} else { > -value = *obj; > -v->type_int64(v, &value, name, errp); > -if (value < INT32_MIN || value > INT32_MAX) { > -/* FIXME questionable reuse of errp if type_int64() changes > - value on error */ > -error_setg(errp, QERR_INVALID_PARAMETER_VALUE, > - name ? name : "null", "int32_t"); > -return; > -} > -*obj = value; > -} > +int64_t value = *obj; > +visit_type_intN(v, &value, name, INT32_MIN, INT32_MAX, "int32_t", errp); > +*obj = value; > } > > void visit_type_int64(Visitor *v, int64_t *obj, const char *name, Error > **errp) > -- > 2.4.3 > > Looks good otherwise. Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 15/35] qom: Swap 'name' next to visitor in ObjectPropertyAccessor

2016-01-05 Thread Marc-André Lureau
at, with that Reviewed-by: Marc-André Lureau > >> or from QAPI to consistently stick the 'name' parameter next >> to the Visitor parameter. >> > > -- > Eric Blake eblake redhat com+1-919-301-3266 > Libvirt virtualization library http://libvirt.org > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 14/35] qapi: Swap visit_* arguments for consistent 'name' placement

2016-01-05 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > JSON uses "name":value, but many of our visitor interfaces were > called with visit_type_FOO(v, &value, name, errp). This can be > a bit confusing to have to mentally swap the paramete

Re: [Qemu-devel] [PATCH v8 02/35] qapi: Avoid use of misnamed DO_UPCAST()

2016-01-05 Thread Marc-André Lureau
not require the derived class to > have Visitor * as its first member, but this does not hurt our > usage patterns in qapi visitors. Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 04/35] hmp: Improve use of qapi visitor

2016-01-05 Thread Marc-André Lureau
't using the visit to > allocate a qapi struct). > > Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 06/35] balloon: Improve use of qapi visitor

2016-01-05 Thread Marc-André Lureau
change is safe. virtio_balloon_stat (the structure passed across virtio-balloon is also __virtio64 = u64) Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 10/35] qapi: Make all visitors supply uint64 callbacks

2016-01-05 Thread Marc-André Lureau
r.type_bool = parse_type_bool; > v->visitor.type_str = parse_type_str; > diff --git a/qapi/string-output-visitor.c b/qapi/string-output-visitor.c > index c0a9331..3ed2b2c 100644 > --- a/qapi/string-output-visitor.c > +++ b/qapi/string-output-visitor.c > @@ -197,6 +197,14 @@ static void print_type_int64(Visitor *v, int64_t *obj, > const char *name, > } > } > > +static void print_type_uint64(Visitor *v, uint64_t *obj, const char *name, > + Error **errp) > +{ > +/* FIXME: print_type_int64 mishandles values over INT64_MAX */ > +int64_t i = *obj; > +print_type_int64(v, &i, name, errp); > +} > + > static void print_type_size(Visitor *v, uint64_t *obj, const char *name, > Error **errp) > { > @@ -346,6 +354,7 @@ StringOutputVisitor *string_output_visitor_new(bool human) > v->human = human; > v->visitor.type_enum = output_type_enum; > v->visitor.type_int64 = print_type_int64; > +v->visitor.type_uint64 = print_type_uint64; > v->visitor.type_size = print_type_size; > v->visitor.type_bool = print_type_bool; > v->visitor.type_str = print_type_str; > -- > 2.4.3 > > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 12/35] qapi: Don't cast Enum* to int*

2016-01-05 Thread Marc-André Lureau
ng of alternate types". > > Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 05/35] vl: Improve use of qapi visitor

2016-01-05 Thread Marc-André Lureau
't using the visit to > allocate a qapi struct). Guarantee that visit_end_struct() > is called if visit_start_struct() succeeded. > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 35/35] RFC: qapi: Adjust layout of FooList types

2016-01-05 Thread Marc-André Lureau
hrough 'foolist->base.next' instead of 'foolist->next'. > > Signed-off-by: Eric Blake > otherwise, patch looks good to me, waiting for non-rfc version if all agree with it, for the review-by tag. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 34/35] qapi: Change visit_type_FOO() to no longer return partial objects

2016-01-05 Thread Marc-André Lureau
TestInputVisitorData > *data, > > visit_type_UserDefOneList(v, NULL, &head, &err); > error_free_or_abort(&err); > -qapi_free_UserDefOneList(head); > +g_assert(!head); > } > > static void test_validate_fail_union_native_list(TestInputVisitorData *data, > @@ -227,7 +224,7 @@ static void > test_validate_fail_union_native_list(TestInputVisitorData *data, > > visit_type_UserDefNativeListUnion(v, NULL, &tmp, &err); > error_free_or_abort(&err); > -qapi_free_UserDefNativeListUnion(tmp); > +g_assert(!tmp); > } > > static void test_validate_fail_union_flat(TestInputVisitorData *data, > @@ -241,7 +238,7 @@ static void > test_validate_fail_union_flat(TestInputVisitorData *data, > > visit_type_UserDefFlatUnion(v, NULL, &tmp, &err); > error_free_or_abort(&err); > -qapi_free_UserDefFlatUnion(tmp); > +g_assert(!tmp); > } > > static void test_validate_fail_union_flat_no_discrim(TestInputVisitorData > *data, > @@ -256,13 +253,13 @@ static void > test_validate_fail_union_flat_no_discrim(TestInputVisitorData *data, > > visit_type_UserDefFlatUnion2(v, NULL, &tmp, &err); > error_free_or_abort(&err); > -qapi_free_UserDefFlatUnion2(tmp); > +g_assert(!tmp); > } > > static void test_validate_fail_alternate(TestInputVisitorData *data, > const void *unused) > { > -UserDefAlternate *tmp = NULL; > +UserDefAlternate *tmp; > Visitor *v; > Error *err = NULL; > > @@ -270,7 +267,7 @@ static void > test_validate_fail_alternate(TestInputVisitorData *data, > > visit_type_UserDefAlternate(v, NULL, &tmp, &err); > error_free_or_abort(&err); > -qapi_free_UserDefAlternate(tmp); > +g_assert(!tmp); > } > > static void do_test_validate_qmp_introspect(TestInputVisitorData *data, > diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c > index f6bd408..7f9191c 100644 > --- a/tests/test-qmp-input-visitor.c > +++ b/tests/test-qmp-input-visitor.c > @@ -708,18 +708,12 @@ static void test_visitor_in_errors(TestInputVisitorData > *data, > > visit_type_TestStruct(v, NULL, &p, &err); > error_free_or_abort(&err); > -/* FIXME - a failed parse should not leave a partially-allocated p > - * for us to clean up; this could cause callers to leak memory. */ > -g_assert(p->string == NULL); > - > -g_free(p->string); > -g_free(p); > +g_assert(!p); > > v = visitor_input_test_init(data, "[ '1', '2', false, '3' ]"); > visit_type_strList(v, NULL, &q, &err); > error_free_or_abort(&err); > -assert(q); > -qapi_free_strList(q); > +assert(!q); > } > > static void test_visitor_in_wrong_type(TestInputVisitorData *data, > -- > 2.4.3 > > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 33/35] qapi: Simplify semantics of visit_next_list()

2016-01-05 Thread Marc-André Lureau
> visit_next_list() to make those conversions simpler if they > require a GenericList visit for now; an assertion will remind > us to adjust things if we need the semantics in the future. > > Signed-off-by: Eric Blake nice cleanup Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 32/35] qapi: Split visit_end_struct() into pieces

2016-01-05 Thread Marc-André Lureau
type_ACPIOSTInfo_fields(v, obj, &err); > |+if (err) { > |+goto out_obj; > |+} > |+visit_check_struct(v, &err); > | out_obj: > |-error_propagate(errp, err); > |-err = NULL; > |-visit_end_struct(v, &err); > |+visit_end_struct(v); > | out: > > Signed-off-by: Eric Blake > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 0/8] ivshmem: test msi=off, remove CharDriver

2016-01-07 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 12:30 PM, wrote: > From: Marc-André Lureau > > This is a ivshmem series with various bits: > - add a test for a recently introduced regression > - the fix is included in the series but was sent separatly to cc -stable > - fix some test leaks > -

Re: [Qemu-devel] [PATCH 0/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Marc-André Lureau
rt > spice: tweak debug messages. > spice/gl: render DisplaySurface via opengl > spice/gl: create dummy primary surface (RfC) > > Marc-André Lureau (1): > spice: reset cursor on resize > Please reorder so that "track gl_block state" is closer to what it i

Re: [Qemu-devel] [PATCH 5/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Marc-André Lureau
_format = qemu_pixman_check_format, > +.dpy_refresh = display_refresh, > +.dpy_mouse_set= display_mouse_set, > +.dpy_cursor_define= display_mouse_define, > + > +.dpy_gl_ctx_create = qemu_spice_gl_create_context, > +.dpy_gl_ctx_destroy = qemu_egl_destroy_context, > +.dpy_gl_ctx_make_current = qemu_egl_make_context_current, > +.dpy_gl_ctx_get_current = qemu_egl_get_current_context, > + > +.dpy_gl_scanout = qemu_spice_gl_scanout, > +.dpy_gl_update = qemu_spice_gl_update, > +}; > + > +#endif /* HAVE_SPICE_GL */ > + > static void qemu_spice_display_init_one(QemuConsole *con) > { > SimpleSpiceDisplay *ssd = g_new0(SimpleSpiceDisplay, 1); > @@ -792,6 +906,15 @@ static void qemu_spice_display_init_one(QemuConsole *con) > qemu_spice_create_host_memslot(ssd); > > ssd->dcl.ops = &display_listener_ops; > +#ifdef HAVE_SPICE_GL > +if (display_opengl) { > +ssd->dcl.ops = &display_listener_gl_ops; > +ssd->dmabuf_fd = -1; > +ssd->gl_unblock_bh = qemu_bh_new(qemu_spice_gl_unblock_bh, ssd); > +ssd->gl_unblock_timer = timer_new_ms(QEMU_CLOCK_REALTIME, > + qemu_spice_gl_block_timer, ssd); > +} > +#endif > ssd->dcl.con = con; > register_displaychangelistener(&ssd->dcl); > } > -- > 1.8.3.1 > After this patch, spice+virgl works :) -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 3/8] console: track gl_block state in QemuConsole

2016-02-18 Thread Marc-André Lureau
> of this. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 2/8] egl-helpers: add functions for render nodes and dma-buf passing

2016-02-18 Thread Marc-André Lureau
+if (!image) { > +return -1; > +} > + > + eglExportDMABUFImageQueryMESA(qemu_egl_display, image, fourcc, > + &num_planes, NULL); > +if (num_planes != 1) { > +eglDestroyImageKHR(qemu_egl_display, image); > +return -1; > +} > +eglExportDMABUFImageMESA(qemu_egl_display, image, &fd, stride, NULL); > +eglDestroyImageKHR(qemu_egl_display, image); > + > +return fd; > +} > + > +#endif /* CONFIG_OPENGL_DMABUF */ > + > +/* -- */ > + > EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win) > { > EGLSurface esurface; > -- > 1.8.3.1 > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 1/8] configure: add dma-buf support detection.

2016-02-18 Thread Marc-André Lureau
;echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak > + echo "GTK_LIBS=$gtk_libs" >> $config_host_mak This could be seperated >if test "$gtk_gl" = "yes" ; then > echo "CONFIG_GTK_GL=y" >> $config_host_mak >fi > @@ -5158,6 +5173,9 @@ if test "$opengl" = "yes" ; then >echo "CONFIG_OPENGL=y" >> $config_host_mak >echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak >echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak > + if test "$opengl_dmabuf" = "yes" ; then > +echo "CONFIG_OPENGL_DMABUF=y" >> $config_host_mak > + fi > fi > > if test "$lzo" = "yes" ; then > -- > 1.8.3.1 > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 5/8] spice: add opengl/virgl/dmabuf support

2016-02-18 Thread Marc-André Lureau
t; +#endif >> }, > > How introspectible is this? Does QMP 'query-command-line-options' cope > will with showing 'gl' as an option only for the qemu binaries where the > #ifdef succeeded? { "execute": "query-command-line-options", "arguments": { "option": "spice" } } {"return": [{"parameters": [{"name": "gl", "type": "boolean"}, (I just sent a libvirt patch that queries successfully the capability too) -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v2 01/12] spice: init dcl before registering qxl interface

2016-02-19 Thread Marc-André Lureau
Hi On Fri, Feb 19, 2016 at 10:14 AM, Gerd Hoffmann wrote: > Without this spice might callback into qemu before ssd->dcl.con is > initialized, resulting in a segfault due to NULL pointer dereference. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v2 11/12] spice: add & use qemu_spice_gl_monitor_config

2016-02-19 Thread Marc-André Lureau
"add opengl/virgl/dmabuf support" patch Reviewed-by: Marc-André Lureau > diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h > index dd9cf6f..f9388c2 100644 > --- a/include/ui/spice-display.h > +++ b/include/ui/spice-display.h > @@ -71,6 +71,7 @@ typedef str

Re: [Qemu-devel] [PATCH v2 06/12] spice: add unblock timer

2016-02-19 Thread Marc-André Lureau
Hi On Fri, Feb 19, 2016 at 10:14 AM, Gerd Hoffmann wrote: > Pure debug aid, print a warning in case unblocking > doesn't happen within one second. > > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Marc-André Lureau > include/ui/spice-display.h | 1 + > ui/sp

Re: [Qemu-devel] [PATCH RFC 00/14] vhost-user: shutdown and reconnection

2016-02-23 Thread Marc-André Lureau
couple of worthy fixes to pick from that. thanks -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] spice/gl: Enable dmabuf only for spice >= 0.13.1

2016-02-24 Thread Marc-André Lureau
Hi - Original Message - > After 474114b7 the dmabuf feature is enabled whenever spice > greater than or equal to spice 0.13.0 is found. This is because > two new functions are required: spice_qxl_gl_scanout and > spice_qxl_gl_draw_async. These were, however, introduce in 0.13.1 > release.

Re: [Qemu-devel] [PULL 4/8] spice: reset cursor on resize

2016-02-25 Thread Marc-André Lureau
gt; +ssd->cursor = c; >> ssd->hot_x = c->hot_x; >> ssd->hot_y = c->hot_y; > > Coverity complains that this would dereference a NULL c, and I think > it's right; either an unlock+return is missing, or the "if" is unnecessary. > Oops, I don&

Re: [Qemu-devel] [PATCH 02/38] qemu-doc: Fix ivshmem huge page example

2016-03-01 Thread Marc-André Lureau
v/hugepages. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > qemu-doc.texi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-doc.texi b/qemu-doc.texi > index bc9dd13..65f3b29 100644 > --- a/qemu-doc.texi

Re: [Qemu-devel] [PATCH 03/38] event_notifier: Make event_notifier_init_fd() #ifdef CONFIG_EVENTFD

2016-03-01 Thread Marc-André Lureau
isting file descriptor @fd. > + * @fd must be a genuine eventfd object, emulation with pipe won't do. > + */ > void event_notifier_init_fd(EventNotifier *e, int fd) > { > e->rfd = fd; > e->wfd = fd; > } > +#endif > > int event_notifier_init(EventNotifier *e, int active) > { > -- > 2.4.3 > > -- Marc-André Lureau

Re: [Qemu-devel] [PATCH 04/38] tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned

2016-03-01 Thread Marc-André Lureau
> ivshmem-test. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau Neat, thanks for fixing my fixme ;) > --- > tests/ivshmem-test.c | 17 - > tests/libqos/pci-pc.c | 8 ++-- > 2 files changed, 14 insertions(+), 11 deletions(-) >

Re: [Qemu-devel] [PATCH 05/38] ivshmem-test: Improve test case /ivshmem/single

2016-03-01 Thread Marc-André Lureau
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > Test state of registers after reset. > > Test reading Interrupt Status clears it. > > Test (invalid) read of Doorbell. > > Add more comments. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lurea

Re: [Qemu-devel] [PATCH 06/38] ivshmem-test: Clean up wait for devices to become operational

2016-03-01 Thread Marc-André Lureau
the IVPosition register instead: it's initially -1, and becomes > non-negative right when the device maps the share memory, so no > change, just cleaner, because it's what guest software is supposed to > do. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lur

Re: [Qemu-devel] [PATCH 07/38] ivshmem-test: Improve test cases /ivshmem/server-*

2016-03-01 Thread Marc-André Lureau
gt; consistency. > > Test MSI-X vector 1 in addition to vector 0. > > Improve comments. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > tests/ivshmem-test.c | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > > d

Re: [Qemu-devel] [PATCH 08/38] ivshmem: Rewrite specification document

2016-03-01 Thread Marc-André Lureau
both, its probably a bug in the new text. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > docs/specs/ivshmem-spec.txt| 244 > + > docs/specs/ivshmem_device_spec.txt | 161 > 2

Re: [Qemu-devel] [PATCH 09/38] ivshmem: Add missing newlines to debug printfs

2016-03-01 Thread Marc-André Lureau
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- Reviewed-by: Marc-André Lureau > hw/misc/ivshmem.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c > i

Re: [Qemu-devel] [PATCH 10/38] ivshmem: Compile debug prints unconditionally to prevent bit-rot

2016-03-01 Thread Marc-André Lureau
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- Reviewed-by: Marc-André Lureau (apparently, there are other places in qemu where this conversion could be done) > hw/misc/ivshmem.c | 14 +++--- > 1 file changed, 7 inse

Re: [Qemu-devel] [PATCH 11/38] ivshmem: Clean up after commit 9940c32

2016-03-01 Thread Marc-André Lureau
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > IVShmemState member eventfd_chr is useless since commit 9940c32. Drop > it. > > Signed-off-by: Markus Armbruster oops indeed, Reviewed-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 12 >

Re: [Qemu-devel] [PATCH 12/38] ivshmem: Drop ivshmem_event() stub

2016-03-01 Thread Marc-André Lureau
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- Reviewed-by: Marc-André Lureau > hw/misc/ivshmem.c | 9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem

Re: [Qemu-devel] [PATCH 13/38] ivshmem: Don't destroy the chardev on version mismatch

2016-03-01 Thread Marc-André Lureau
e(). It would a nice follow up to standardize this there too. Reviewed-by: Marc-André Lureau > --- > docs/specs/ivshmem-spec.txt | 3 +++ > hw/misc/ivshmem.c | 3 +-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/docs/specs/ivshmem-spec.txt b/docs

<    1   2   3   4   5   6   7   8   9   10   >