From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKrnw-0001CB-Uj for qemu-devel@nongnu.org; Wed, 27 Mar 2013 10:58:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKrnu-0005Dc-OR for qemu-devel@nongnu.org; Wed, 27 Mar 2013 10:58:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKrnu-0005DJ-H6 for qemu-devel@nongnu.org; Wed, 27 Mar 2013 10:58:18 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2REwHee021934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 27 Mar 2013 10:58:17 -0400 Message-ID: <51530900.7050103@redhat.com> Date: Wed, 27 Mar 2013 15:58:08 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1364292483-16564-1-git-send-email-hdegoede@redhat.com> <1364292483-16564-8-git-send-email-hdegoede@redhat.com> <51519DA6.3070306@redhat.com> <5151A301.30503@redhat.com> <5151A78D.5010708@redhat.com> <5152FDA9.1090606@redhat.com> In-Reply-To: <5152FDA9.1090606@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/11] qemu-char: Move incrementing of avail_connections to qdev-properties-system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: Amit Shah , qemu-devel@nongnu.org, Gerd Hoffmann Il 27/03/2013 15:09, Hans de Goede ha scritto: > Hi, > > On 03/26/2013 02:50 PM, Paolo Bonzini wrote: > > > >>> 1) For most problematic devices, the proper fix would be to make them >>> use a chardev qdev property for there chardev usage, and then this >>> would be automatically fixed, agreed? >> >> At least on x86, all devices already use a chardev qdev property. > > Yes on x86 maybe, but a lot of the other serial-port emulations are > still using serial_hds directly, making proper avail_connections tracking > a pain. serial_hds is still passed to most devices via a chardev qdev property. See for example sparc/leon3.c, which uses grlib_apbuart_create and that function sets the chardev. Luckily there are very few UART implementations, most boards use the 8250/16550, hence this is even true of boards that are generally not qdev-ified (like OMAP). There are exceptions, like mcf_uart.c and bt-hci-csr.c. Paolo > Anyways I've audited all frontends now, fixing things where necessary, > and where possible in a generic way. > > I'll send a patch for this right after this mail. > > Regards, > > Hans