On 08/17/2011 06:45 AM, Avi Kivity wrote:

+{
+    MemoryRegion *io_space = isabus->address_space_io;
+    const MemoryRegionPortio *pio_iter;
+
+    /* START is how we should treat DEV, regardless of the actual
+       contents of the portio array.  This is how the old code
+       actually handled e.g. the FDC device.  */
+    if (dev) {
+        isa_init_ioport(dev, start);
+    }
+
+    for (; pio_start->size != 0; pio_start = pio_iter + 1) {
+        unsigned int off_low = UINT_MAX, off_high = 0;
+        MemoryRegionOps *ops;
+        MemoryRegion *region;
+
+        for (pio_iter = pio_start; pio_iter->size; ++pio_iter) {
+            if (pio_iter->offset<  off_low) {
+                off_low = pio_iter->offset;
+            }
+            if (pio_iter->offset + pio_iter->len>  off_high) {
+                off_high = pio_iter->offset + pio_iter->len;
+            }

This is supposed to pick up MRPs that are for the same port address? If so that should be in the loop termination condition.

Oh, after seeing a user I see how it works now. But can't we derive this information instead of forcing the user to specify it?

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


Reply via email to