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.