From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5IAd-0006kq-7A for qemu-devel@nongnu.org; Sun, 18 Sep 2011 10:16:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5IAb-0007fS-A0 for qemu-devel@nongnu.org; Sun, 18 Sep 2011 10:16:35 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:37996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5IAa-0007fA-TP for qemu-devel@nongnu.org; Sun, 18 Sep 2011 10:16:33 -0400 Received: by gye5 with SMTP id 5so4517906gye.4 for ; Sun, 18 Sep 2011 07:16:32 -0700 (PDT) Sender: Richard Henderson Message-ID: <4E75FD3C.4030304@twiddle.net> Date: Sun, 18 Sep 2011 07:16:28 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1314144835-29098-1-git-send-email-rth@twiddle.net> <1314144835-29098-13-git-send-email-rth@twiddle.net> <4E75F611.5070806@redhat.com> In-Reply-To: <4E75F611.5070806@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 12/16] vga: Convert to isa_register_portio_list. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org On 09/18/2011 06:45 AM, Avi Kivity wrote: >> + /* The PCI-ISA bridge should have been configured properly such that >> + this works for PCI devices as well. This only supports one bridge, >> + but "secondary" VGA cards are generally accessed by MMIO only anyway. */ >> + isa_register_portio_list(NULL, 0x3b0, vga_portio_list, s, "vga"); >> >> memory_region_init_io(vga_mem,&vga_mem_ops, s, > > This is called even for pci machines which have no ISA bus (and even > if they did, the code should work wit the pci bus, not ISA). The code > should return the portio list of the caller to register, or perhaps > accept a callback to do the registration. You're over-thinking this. It's all legacy ISA crap full stop. If the machine doesn't have a PCI-ISA bridge, then the machine will also be prepared to access the VGA registers via its BARs. In such a case we just should skip this entire section. Probably isa_register_portio_list should simply notice no ISA bus has been registered and do nothing. r~