From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjbjH-0003Ys-Ah for qemu-devel@nongnu.org; Fri, 04 Sep 2009 12:33:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjbjB-0003XD-TX for qemu-devel@nongnu.org; Fri, 04 Sep 2009 12:33:38 -0400 Received: from [199.232.76.173] (port=55416 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjbjB-0003X9-KC for qemu-devel@nongnu.org; Fri, 04 Sep 2009 12:33:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4283) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjbjB-0001EN-4I for qemu-devel@nongnu.org; Fri, 04 Sep 2009 12:33:33 -0400 Date: Fri, 4 Sep 2009 22:03:06 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH] virtio-console: Have a static instance of virtconsole Message-ID: <20090904163306.GA31086@amit-x200.redhat.com> References: <1252055670-26958-1-git-send-email-amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On (Fri) Sep 04 2009 [19:26:27], Blue Swirl wrote: > On Fri, Sep 4, 2009 at 12:14 PM, Amit Shah wrote: > > Currently the VirtIOConsole struct is allocated from the call > > to virtio_common_init, also doing an UP_CAST implicitly. > > > > The new multiport functionality will need a few arrays and > > it's easier to move to the new VMState infrastructure by > > keeping it all within one struct. > > > +VirtIOConsole virtconsole; > > IMHO this is going to wrong direction. What kind of code would need a > static instance? Adding multiple ports to the console device, we'll have to store an array of ports here as well as config space. Both of these are device-specific. Amit