This patch defines delayed MMIO zones for e1000 ethernet card.

Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
---
 qemu/hw/e1000.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c
index 01f8983..97f46f6 100644
--- a/qemu/hw/e1000.c
+++ b/qemu/hw/e1000.c
@@ -26,6 +26,7 @@
 #include "hw.h"
 #include "pci.h"
 #include "net.h"
+#include "qemu-kvm.h"
 
 #include "e1000_hw.h"
 
@@ -938,6 +939,22 @@ e1000_mmio_map(PCIDevice *pci_dev, int region_num,
 
     d->mmio_base = addr;
     cpu_register_physical_memory(addr, PNPMMIO_SIZE, d->mmio_index);
+
+    if (kvm_enabled()) {
+        /* delayed zones are:
+         * 0x00000 -> 0x000C0        exclude: E1000_ICR,4
+         * 0x000C4 -> 0x00400        exclude: E1000_TCTL,4
+         * 0x00404 -> 0x03818        exclude: E1000_TDT,4
+         * 0x0381C -> 0x20000        PNPMMIO_SIZE
+         */
+        qemu_kvm_register_delayed_mmio(addr, E1000_ICR);
+        qemu_kvm_register_delayed_mmio(addr + E1000_ICR + 4,
+                                       E1000_TCTL - (E1000_ICR + 4));
+        qemu_kvm_register_delayed_mmio(addr + E1000_TCTL + 4,
+                                       E1000_TDT - (E1000_TCTL + 4));
+        qemu_kvm_register_delayed_mmio(addr + E1000_TDT + 4,
+                                       PNPMMIO_SIZE - (E1000_TDT + 4));
+    }
 }
 
 static int
-- 
1.5.2.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to