From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtgs8-0004fw-1d for qemu-devel@nongnu.org; Wed, 17 Aug 2011 10:13:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qtgs2-0004Tc-5a for qemu-devel@nongnu.org; Wed, 17 Aug 2011 10:13:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtgs1-0004TX-Qw for qemu-devel@nongnu.org; Wed, 17 Aug 2011 10:13:26 -0400 Message-ID: <4E4BCC82.6000304@redhat.com> Date: Wed, 17 Aug 2011 07:13:22 -0700 From: Avi Kivity MIME-Version: 1.0 References: <1313513145-5348-1-git-send-email-rth@twiddle.net> <1313513145-5348-14-git-send-email-rth@twiddle.net> <4E4BCA67.4090202@redhat.com> In-Reply-To: <4E4BCA67.4090202@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 13/14] ide: Convert to isa_register_old_portio_list. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On 08/17/2011 07:04 AM, Avi Kivity wrote: > >> + >> +void ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int >> iobase2) >> { >> - register_ioport_write(iobase, 8, 1, ide_ioport_write, bus); >> - register_ioport_read(iobase, 8, 1, ide_ioport_read, bus); >> + /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA >> + bridge has been setup properly to always register with ISA. */ >> + isa_register_old_portio_list(dev, iobase, ide_portio_list, bus, >> "ide"); > > Which PCI-ISA bridge? If you're behind a secondary PCI bridge, you've > now bypassed its filtering. > Something else - it's okay to leak all this memory for ISA, but not PCI. We could separate this into a helper that returns an array of MemoryRegions. i_r_o_p_l() could then just use the helper, while pci-ide would call the helper directly and then all pci_register_legacy_ioport() on each MemoryRegion. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.