From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxbpc-0005F4-VE for qemu-devel@nongnu.org; Thu, 19 Jun 2014 08:52:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxbpW-00057F-QK for qemu-devel@nongnu.org; Thu, 19 Jun 2014 08:52:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxbpW-00056x-IC for qemu-devel@nongnu.org; Thu, 19 Jun 2014 08:52:38 -0400 Message-ID: <53A2DD10.7070201@redhat.com> Date: Thu, 19 Jun 2014 14:52:32 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403073840-32603-1-git-send-email-pbonzini@redhat.com> <1403073840-32603-32-git-send-email-pbonzini@redhat.com> <53A2D197.7040800@redhat.com> In-Reply-To: <53A2D197.7040800@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2.1 31/36] qemu-char: introduce qemu_chr_alloc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: wenchaoqemu@gmail.com, lcapitulino@redhat.com 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 >> Signed-off-by: Paolo Bonzini >> --- >> 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 >