From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NydFh-0001AQ-Jt for qemu-devel@nongnu.org; Sun, 04 Apr 2010 23:45:29 -0400 Received: from [140.186.70.92] (port=58322 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NydFf-0001A3-Fe for qemu-devel@nongnu.org; Sun, 04 Apr 2010 23:45:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NydFd-000615-IE for qemu-devel@nongnu.org; Sun, 04 Apr 2010 23:45:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28700) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NydFd-000610-9I for qemu-devel@nongnu.org; Sun, 04 Apr 2010 23:45:25 -0400 Date: Mon, 5 Apr 2010 09:13:38 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 4/6] Always notify consumers of char devices if they're open Message-ID: <20100405034338.GB7100@amit-x200.redhat.com> References: <1270140161-17216-1-git-send-email-agraf@suse.de> <1270140161-17216-5-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1270140161-17216-5-git-send-email-agraf@suse.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: waldi@debian.org, Carsten Otte , qemu-devel@nongnu.org, aurelien@aurel32.net On (Thu) Apr 01 2010 [18:42:39], Alexander Graf wrote: > When using virtio-console on s390, the input doesn't work. > > The root of the problem is rather simple. What happens is the following: > > 1) create character device for stdio > 2) char device is done creating, sends OPENED event > 3) virtio-console adds handlers > 4) no event comes because the char device is open already > 5) virtio-console doesn't accept input because it didn't > receive an OPENED event > > To make that sure virtio-console gets notified that the character device > is open even when it's been open from the beginning, this patch introduces > a variable that keeps track of the opened state. If the device is open when > the event handlers get installed, we just notify the handler. > > This fixes input with virtio-console on s390. > > Signed-off-by: Alexander Graf Acked-by: Amit Shah Amit