qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/14] isa: Add isa_register_old_portio_list().


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 02/14] isa: Add isa_register_old_portio_list().
Date: Wed, 17 Aug 2011 06:50:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

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

[Prev in Thread] Current Thread [Next in Thread]