]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
passthrough: Fix duplicated MAC addr when multi-port NIC assigned to HVM domain
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 31 Mar 2009 10:45:38 +0000 (11:45 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 31 Mar 2009 10:45:38 +0000 (11:45 +0100)
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.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
hw/pass-through.c

index 4baf84b2f19bfa0b5600b97ed713b9d3590e511e..720c9e69dc8a3da8e34503d28846c872161693e3 100644 (file)
@@ -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,