Il 19/06/2014 14:03, Eric Blake ha scritto:
On 06/18/2014 12:43 AM, Paolo Bonzini wrote:
The next patch will modify this function to initialize state that is
common to all backends.

Reviewed-by: Fam Zheng <f...@redhat.com>
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 backends/baum.c       |  2 +-
 backends/msmouse.c    |  2 +-
 include/sysemu/char.h |  9 +++++++++
 qemu-char.c           | 32 +++++++++++++++++++-------------
 spice-qemu-char.c     |  2 +-
 ui/console.c          |  2 +-
 6 files changed, 32 insertions(+), 17 deletions(-)

Missing hw/misc/ivshmem.c:

static int pci_ivshmem_init(PCIDevice *dev)
{
...
        s->eventfd_chr = g_malloc0(s->vectors * sizeof(CharDriverState *));

        qemu_chr_add_handlers(s->server_chr, ivshmem_can_receive,
ivshmem_read,
                     ivshmem_event, s);


Is that going to matter?  If not,

Heh, I did the same wrong grep when writing the patch. :)

This is allocating a vector of _pointers_ to CharDriverState. The pointers are initialized separately using create_eventfd_chr_device (that uses qemu_chr_open_eventfd and hence qemu_chr_alloc).

Paolo

Reviewed-by: Eric Blake <ebl...@redhat.com>



Reply via email to