Greg Kurtzer wrote:
Hello,

I noticed some problems with the e1000 implementation in kvm >= 70. At
first glance it seemed liked a PXE problem as it would not acknowledge
the DHCP offer from the server. I tried several different Etherboot
ROM images and version 5.2.6 seemed to work. That version isn't PXE
compliant so I built an ELF image to boot, and it downloaded it very,
very, very, very slowly (as in about 10 minutes) but it did end up
working.

This all worked perfectly with version 69 and previous.

There are two patches to e1000 in kvm-70; can you try backing them out (patch -Rp1 < test.patch) to see which one is guilty?

Candidates attached.


--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.

commit 2ec717a98c8b8e0c8f1ddc562115ca81d2dc024e
Author: Laurent Vivier <[EMAIL PROTECTED]>
Date:   Fri May 30 16:07:31 2008 +0200

    kvm: qemu: coalesced MMIO support (e1000)
    
    This patch defines coalesced MMIO zones for e1000 ethernet card.
    
    Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c
index 01f8983..5b3a365 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,18 @@ 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()) {
+	int i;
+        uint32_t excluded_regs[] = {
+            E1000_MDIC, E1000_ICR, E1000_ICS, E1000_IMS,
+            E1000_IMC, E1000_TCTL, E1000_TDT, PNPMMIO_SIZE
+        };
+        qemu_kvm_register_coalesced_mmio(addr, excluded_regs[0]);
+        for (i = 0; excluded_regs[i] != PNPMMIO_SIZE; i++)
+            qemu_kvm_register_coalesced_mmio(addr + excluded_regs[i] + 4,
+                             excluded_regs[i + 1] - excluded_regs[i] - 4);
+    }
 }
 
 static int
commit 404ce95cb202ca6015beb26e9b870f91c0309ee0
Author: Anthony Liguori <[EMAIL PROTECTED]>
Date:   Wed May 7 16:40:58 2008 -0500

    kvm: qemu: fix e1000 can_receive handler
    
    The current logic of the can_receive handler is to allow packets whenever the
    receiver is disabled or when there are descriptors available in the ring.
    
    I think the logic ought to be to allow packets whenever the receiver is enabled
    and there are descriptors available in the ring.
    
    Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c
index 0728539..01f8983 100644
--- a/qemu/hw/e1000.c
+++ b/qemu/hw/e1000.c
@@ -520,8 +520,8 @@ e1000_can_receive(void *opaque)
 {
     E1000State *s = opaque;
 
-    return (!(s->mac_reg[RCTL] & E1000_RCTL_EN) ||
-            s->mac_reg[RDH] != s->mac_reg[RDT]);
+    return ((s->mac_reg[RCTL] & E1000_RCTL_EN) &&
+	    s->mac_reg[RDH] != s->mac_reg[RDT]);
 }
 
 static void

Reply via email to