From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTYT9-0003Io-Ag for qemu-devel@nongnu.org; Wed, 22 Jul 2009 05:50:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTYT4-0003HN-Gy for qemu-devel@nongnu.org; Wed, 22 Jul 2009 05:50:38 -0400 Received: from [199.232.76.173] (port=59308 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTYT4-0003H5-Ca for qemu-devel@nongnu.org; Wed, 22 Jul 2009 05:50:34 -0400 Received: from mx2.redhat.com ([66.187.237.31]:44485) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTYT3-0005CE-Qa for qemu-devel@nongnu.org; Wed, 22 Jul 2009 05:50:34 -0400 Message-ID: <4A66E06B.80307@redhat.com> Date: Wed, 22 Jul 2009 11:48:27 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1247841685-18495-1-git-send-email-aliguori@us.ibm.com> <1247841685-18495-2-git-send-email-aliguori@us.ibm.com> <4A65D4DD.1040603@redhat.com> <4A65D676.9050406@us.ibm.com> <4A65D8CA.20004@redhat.com> <4A65DD7C.3090902@us.ibm.com> <4A65E01E.8010505@redhat.com> <4A65E30F.1090608@us.ibm.com> In-Reply-To: <4A65E30F.1090608@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/2] Introduce CharDriverState qdev property type List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook On 07/21/09 17:47, Anthony Liguori wrote: > Gerd Hoffmann wrote: >> Not sure what qdev_prop_set_chrdev() should accept then. struct >> pointer? string? > > Good question. I think it depends on how we connect things. We could > introduce another structure for front-ends and then have a separate > connect mechanism. The association of names would be transparent to > qdev/devices. Hmm. When going that route it we might not use attributes at all but just tie stuff directly into Device*, i.e. DeviceState gets a backend link and DeviceInfo gets a connect callback. > We could also hand the chrdev structure directly to the device but then > you have to deal with setting/unsetting. Optional Property->notify() callback should do for devices which actually care (cdrom to signal media change to guest maybe). cheers, Gerd