Hello community,

here is the log from the commit of package kvm for openSUSE:11.3
checked in at Tue May 31 17:55:56 CEST 2011.



--------
--- old-versions/11.3/UPDATES/all/kvm/kvm.changes       2011-05-18 
17:55:02.000000000 +0200
+++ 11.3/kvm/kvm.changes        2011-05-20 23:48:36.000000000 +0200
@@ -1,0 +2,5 @@
+Fri May 20 21:32:32 UTC 2011 - [email protected]
+
+- fix for e1000 fails with solaris guest (bnc#626654)
+
+-------------------------------------------------------------------

calling whatdependson for 11.3-i586


New:
----
  kvm-qemu-preXX-e1000-Pad-short-frames-to-minimum-size-60-.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kvm.spec ++++++
--- /var/tmp/diff_new_pack.rIjDkL/_old  2011-05-31 17:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.rIjDkL/_new  2011-05-31 17:55:37.000000000 +0200
@@ -77,7 +77,7 @@
 Summary:        Kernel-based Virtual Machine
 Url:            http://kvm.qumranet.com/
 Version:        0.12.5
-Release:        1.<RELEASE4>
+Release:        1.<RELEASE6>
 Source0:        qemu-%{name}-%{version}.tar.bz2
 Source1:        60-kvm.rules
 Source2:        qemu-ifup
@@ -134,6 +134,7 @@
 Patch121:       kvm-qemu-preXX-report-default-mac-used.patch
 Patch122:       kvm-qemu-preXX-virtio-blk-fail-unaligned-requests.patch
 Patch123:       kvm-qemu-no-hot-unplug-for-certain-devices.patch
+Patch124:       kvm-qemu-preXX-e1000-Pad-short-frames-to-minimum-size-60-.patch
 
 Patch200:       kvm-studio-slirp-nooutgoing.patch
 Patch201:       kvm-studio-vnc.patch
@@ -248,6 +249,7 @@
 %patch121 -p1
 %patch122 -p1
 %patch123 -p1
+%patch124 -p1
 
 # Studio addons
 %patch200 -p1

++++++ kvm-qemu-preXX-e1000-Pad-short-frames-to-minimum-size-60-.patch ++++++
>From 78aeb23eded2d0b765bf9145c71f80025b568acd Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <[email protected]>
Date: Sat, 18 Sep 2010 21:43:45 +0100
Subject: [PATCH] e1000: Pad short frames to minimum size (60 bytes)

The OpenIndiana (Solaris) e1000g driver drops frames that are too long
or too short.  It expects to receive frames of at least the Ethernet
minimum size.  ARP requests in particular are small and will be dropped
if they are not padded appropriately, preventing a Solaris VM from
becoming visible on the network.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
---
 hw/e1000.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Index: qemu-kvm-0.12.5/hw/e1000.c
===================================================================
--- qemu-kvm-0.12.5.orig/hw/e1000.c
+++ qemu-kvm-0.12.5/hw/e1000.c
@@ -52,6 +52,7 @@ static int debugflags = DBGBIT(TXERR) |
 
 #define IOPORT_SIZE       0x40
 #define PNPMMIO_SIZE      0x20000
+#define MIN_BUF_SIZE      60 /* Min. octets in an ethernet frame sans FCS */
 
 /*
  * HW models:
@@ -624,10 +625,19 @@ e1000_receive(VLANClientState *nc, const
     uint32_t rdh_start;
     uint16_t vlan_special = 0;
     uint8_t vlan_status = 0, vlan_offset = 0;
+    uint8_t min_buf[MIN_BUF_SIZE];
 
     if (!(s->mac_reg[RCTL] & E1000_RCTL_EN))
         return -1;
 
+    /* Pad to minimum Ethernet frame length */
+    if (size < sizeof(min_buf)) {
+        memcpy(min_buf, buf, size);
+        memset(&min_buf[size], 0, sizeof(min_buf) - size);
+        buf = min_buf;
+        size = sizeof(min_buf);
+    }
+
     if (size > s->rxbuf_size) {
         DBGOUT(RX, "packet too large for buffers (%lu > %d)\n",
                (unsigned long)size, s->rxbuf_size);



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to