From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55991 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqPXQ-00069c-0A for qemu-devel@nongnu.org; Fri, 18 Feb 2011 07:34:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqPXO-0005I8-TT for qemu-devel@nongnu.org; Fri, 18 Feb 2011 07:34:19 -0500 Received: from mail-ew0-f45.google.com ([209.85.215.45]:54212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqPXO-0005I1-Nw for qemu-devel@nongnu.org; Fri, 18 Feb 2011 07:34:18 -0500 Received: by ewy24 with SMTP id 24so19384ewy.4 for ; Fri, 18 Feb 2011 04:34:18 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4D5E6747.6020603@redhat.com> Date: Fri, 18 Feb 2011 13:34:15 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <4D57FBCD.5060209@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 06/10] vmmouse: convert to qdev List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Markus Armbruster , qemu-devel On 02/17/2011 08:52 PM, Blue Swirl wrote: > On Wed, Feb 16, 2011 at 11:51 AM, Markus Armbruster wrote: >> Blue Swirl writes: >> >>> On Tue, Feb 15, 2011 at 12:07 PM, Markus Armbruster wrote: >>>> Anthony Liguori writes: >>>> >>>>> On 02/12/2011 11:03 AM, Markus Armbruster wrote: >>>>>> Blue Swirl writes: >>>>>> >>>>>> >>>>>>> Convert to qdev, also add a proper reset function. >>>> [...] >>>>>> Pointer properties are for dirty hacks only. Is there really no better >>>>>> solution? Why does it have to be a property? >>>>>> >>>>> >>>>> vmmouse is really just an extension to the PS2 Mouse. It's definitely >>>>> not an ISA device. >>>>> >>>>> In terms of qdev enablement, I would just make it a boolean option to >>>>> the PS2Mouse and not expose it as a top level device at all. It >>>>> cannot exist without a PS2Mouse. >>>> >>>> Which means making it a separate qdev is wrong. That wrongness gave >>>> rise to the dirty pointer property. Pointer property serves as canary >>>> again. >>>> >>>> What now? >>> >>> I don't find pointer property use so dirty, >> >> See commit 036f7166. >> >>> but I'll try to combine >>> the devices to see whether that makes sense. >> >> Appreciated. > > The attached patch would merge the devices, but I'm not so sure this > is the right approach. Merging seems to be OK, the registration could > be removed harder by adding a switch for known vmport values. > > But vmmouse couldn't be left out of the build anymore since it would > be built per target (because of CPUState dependencies). That would be > a step backwards. Perhaps the register access helpers should be pushed > to board level. Is there any fundamental reason why obj-i386-$(CONFIG_VMMOUSE) doesn't work? Paolo