diff --git a/configure b/configure index ad12688551..066622865f 100755 --- a/configure +++ b/configure @@ -272,8 +272,6 @@ for opt do ;; --cxx=*) CXX="$optarg" ;; - --iasl=*) iasl="$optarg" - ;; --source-path=*) source_path="$optarg" ;; --cpu=*) cpu="$optarg" @@ -652,6 +650,8 @@ for opt do ;; --cxx=*) ;; + --iasl=*) iasl="$optarg" + ;; --objcc=*) objcc="$optarg" ;; --make=*) make="$optarg" diff --git a/hw/net/e1000.c b/hw/net/e1000.c index ae6359117d..8387443ee3 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1106,7 +1106,7 @@ mac_writereg(E1000State *s, int index, uint32_t val) s->mac_reg[index] = val; - if (index == RA || index == RA + 1) { + if (index == RA + 1) { macaddr[0] = cpu_to_le32(s->mac_reg[RA]); macaddr[1] = cpu_to_le32(s->mac_reg[RA + 1]); qemu_format_nic_info_str(qemu_get_queue(s->nic), (uint8_t *)macaddr); diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 7f2b4db449..5329f44a9d 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -2741,7 +2741,10 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val) switch (addr) { - case MAC0 ... MAC0+5: + case MAC0 ... MAC0+4: + s->phys[addr - MAC0] = val; + break; + case MAC0+5: s->phys[addr - MAC0] = val; qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys); break; diff --git a/hw/pci/pci.c b/hw/pci/pci.c index ed32059bf8..49eca955aa 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -47,6 +47,7 @@ static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *pcibus_get_dev_path(DeviceState *dev); static char *pcibus_get_fw_dev_path(DeviceState *dev); static int pcibus_reset(BusState *qbus); +static void pci_bus_finalize(Object *obj); static Property pci_props[] = { DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1), @@ -73,6 +74,7 @@ static const TypeInfo pci_bus_info = { .name = TYPE_PCI_BUS, .parent = TYPE_BUS, .instance_size = sizeof(PCIBus), + .instance_finalize = pci_bus_finalize, .class_init = pci_bus_class_init, }; @@ -375,6 +377,12 @@ int pci_bus_num(PCIBus *s) return s->parent_dev->config[PCI_SECONDARY_BUS]; } +static void pci_bus_finalize(Object *obj) +{ + PCIBus *bus = PCI_BUS(obj); + vmstate_unregister(NULL, &vmstate_pcibus, bus); +} + static int get_pci_config_device(QEMUFile *f, void *pv, size_t size) { PCIDevice *s = container_of(pv, PCIDevice, config);