WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ioemu: Fix duplicated MAC addresses when multi-port

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] ioemu: Fix duplicated MAC addresses when multi-port NIC is assigned to HVM domain
From: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
Date: Thu, 26 Mar 2009 17:11:01 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 26 Mar 2009 01:11:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch fixes duplicated MAC address when multi-port NIC is
assigned to HVM domain.

Currently multi-function device is shown as two single function
devices. e1000e driver and igb driver for linux add 1 to MAC address of
second port of multi-port NIC. But they don't add 1 to MAC address of
second port if NIC is single-function device. Because of this, the MAC
addresses of the first port and the second port are duplicated.

The patch make Header Type register passthrough-type. This means a
multi-function device is shown as two multi-function devices which
implement only one function. So e1000e driver and igb driver add 1 to
MAC address of second port.

When we use windows guest, the same issue occurs, the patch fix it.

Thanks,
--
Yuji Shimada


Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>

diff --git a/hw/pass-through.c b/hw/pass-through.c
index b82fdf9..a498f62 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -265,18 +265,6 @@ static struct pt_reg_info_tbl pt_emu_reg_header0_tbl[] = {
         .u.b.write  = pt_byte_reg_write,
         .u.b.restore  = pt_byte_reg_restore,
     },
-    /* Header Type reg */
-    {
-        .offset     = PCI_HEADER_TYPE,
-        .size       = 1,
-        .init_val   = 0x00,
-        .ro_mask    = 0xFF,
-        .emu_mask   = 0x80,
-        .init       = pt_common_reg_init,
-        .u.b.read   = pt_byte_reg_read,
-        .u.b.write  = pt_byte_reg_write,
-        .u.b.restore  = NULL,
-    },
     /* Interrupt Line reg */
     {
         .offset     = PCI_INTERRUPT_LINE,


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ioemu: Fix duplicated MAC addresses when multi-port NIC is assigned to HVM domain, Yuji Shimada <=