From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VifFJ-0003BT-Th for qemu-devel@nongnu.org; Tue, 19 Nov 2013 01:57:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VifFD-0007n1-Up for qemu-devel@nongnu.org; Tue, 19 Nov 2013 01:57:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VifFD-0007mo-Mt for qemu-devel@nongnu.org; Tue, 19 Nov 2013 01:57:07 -0500 Message-ID: <1384844223.16718.93.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 19 Nov 2013 07:57:03 +0100 In-Reply-To: <5286809B.1090000@spineless.org> References: <52795824.3090105@citrix.com> <1383735351.1739.57.camel@nilsson.home.kraxel.org> <527A62BD.2010401@spineless.org> <1383831984.3511.78.camel@nilsson.home.kraxel.org> <527BB7D2.6070503@spineless.org> <5286809B.1090000@spineless.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Multi-head support RFC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Baboval Cc: qemu-devel@nongnu.org Hi, > I think it would be better if the HwOps calls all took a QemuConsole > instead of the opaque structure. The hw implementations can dig their > opaque structure out from there. QemuConsole is private to ui/console.c though (and I prefer to keep it this way). So we need either a helper function to query con->hw or we keep the opaque and pass QemuConsole as additional parameter. When going this route. Alternative approach: struct my_gfx_card_state { PCIDevice pci; [ ... ] struct my_head_state { QemuConsole *con; [ ... ] } heads[MAX_HEADS]; } Then instead of graphic_console_init(..., &state); call graphic_console_init(..., &state->heads[i]); so you can figure the head in the callbacks. cheers, Gerd