From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wujwy-000542-KV for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:56:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wujwt-0001xE-Pc for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:56:28 -0400 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:56525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wujwt-0001wi-Lr for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:56:23 -0400 Received: by mail-qc0-f181.google.com with SMTP id x13so976145qcv.12 for ; Wed, 11 Jun 2014 07:56:23 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53986E13.4090607@redhat.com> Date: Wed, 11 Jun 2014 16:56:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1391548666-5513-1-git-send-email-david.marchand@6wind.com> <1402493944-19101-1-git-send-email-david.marchand@6wind.com> In-Reply-To: <1402493944-19101-1-git-send-email-david.marchand@6wind.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] char: fix avail_connections init in qemu_chr_open_eventfd() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Marchand , qemu-devel@nongnu.org Cc: cam@cs.ualberta.ca, Gerd Hoffmann , aliguori@amazon.com Il 11/06/2014 15:39, David Marchand ha scritto: > When trying to use a ivshmem server with qemu, ivshmem init code tries to > create a CharDriverState object for each eventfd retrieved from the server. > To create this object, a call to qemu_chr_open_eventfd() is done. > Right after this, before adding a frontend, qemu_chr_fe_claim_no_fail() is > called. > qemu_chr_open_eventfd() does not set avail_connections to 1, so no frontend can > be associated because qemu_chr_fe_claim_no_fail() makes qemu stop right away. > > This problem comes from 456d60692310e7ac25cf822cc1e98192ad636ece > "qemu-char: Call fe_claim / fe_release when not using qdev chr properties". > > Fix this, by setting avail_connections to 1 in qemu_chr_open_eventfd(). > > Signed-off-by: David Marchand > --- > qemu-char.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > > No change since initial patch: http://patchwork.ozlabs.org/patch/316785/ > I just rebased this patch on top of master branch and removed the [RFC] part. CCing Gerd who lately has been taking care of qemu-char.c (kraxel@redhat.com). The patch has a small coding style problem; it's missing braces around the "if" statement. Please send an updated version and include Gerd in the email. Thanks, Paolo