change q35 default NIC to e1000e
cover change q35 default NIC to e1000e
The Intel 82574 NIC has better performance and more features than the aging e1000 (aka 82540), for example MSI-X. This patch chooses it by default for the Q35 machine type.
Drivers for 82574 were added first to Linux 2.6.27 (2008) and Windows 2008 R2. This does mean that Windows 2008 will not work anymore with Q35 machine types and a default "-net nic -net xxx" network configuration; it did work before because it does have an AHCI driver. However, Windows 2008 has been declared out of main stream support in 2015. It will get out of extended support in 2020. Windows 2008 R2 has the same end of support dates and, since the two are basically Vista vs. Windows 7, R2 probably is more popular.
Opinions?
Paolo
Paolo Bonzini (2):
net: add e1000e model to the "simple" -net/-nic options
q35: change default NIC to e1000e
hw/i386/pc.c | 5 +++-- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/pci/pci.c | 2 ++ include/hw/i386/pc.h | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/2 net: add e1000e model to the "simple" -net/-nic options
--- hw/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+)
hw/pci/pci.c +2 -0
@@ -1822,6 +1822,7 @@ static const char * const pci_nic_models[] = {"i82559er" ,"rtl8139" ,"e1000" , +"e1000e" ,"pcnet" ,"virtio" , "sungem",
@@ -1835,6 +1836,7 @@ static const char * const pci_nic_names[] = {"i82559er" ,"rtl8139" ,"e1000" , +"e1000e" ,"pcnet" ,"virtio-net-pci" , "sungem",
Signature · 1 line
2.14.3
Re: [Qemu-devel] [PATCH 1/2] net: add e1000e model to the "simple" -net/-nic options
Quoted 18 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>--- hw/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+)hw/pci/pci.c +1
-0@@ -1822,6 +1822,7 @@ static const char * const pci_nic_models[] = {"i82559er" ,"rtl8139" ,"e1000" , +"e1000e" ,"pcnet" ,"virtio" , "sungem",
hw/pci/pci.c static const char * const pci_nic_names[] = { · line 1842
Quoted 7 lines
hw/pci/pci.c +1
-0@@ -1835,6 +1836,7 @@ static const char * const pci_nic_names[] = {"i82559er" ,"rtl8139" ,"e1000" , +"e1000e" ,"pcnet" ,"virtio-net-pci" , "sungem",
I think it would be better and more consisten to finally fix this mess and automatically allow all devices in the category DEVICE_CATEGORY_NETWORK that are derived from TYPE_PCI_DEVICE, instead of manually maintaining this list here...?
Thomas
Re: [Qemu-devel] [PATCH 1/2] net: add e1000e model to the "simple" -net/-nic options
Quoted 23 lines · Thomas Huth
Quoted 22 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>--- hw/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+)hw/pci/pci.c +2
-0@@ -1822,6 +1822,7 @@ static const char * const pci_nic_models[] = {"i82559er" ,"rtl8139" ,"e1000" , +"e1000e" ,"pcnet" ,"virtio" , "sungem",@@ -1835,6 +1836,7 @@ static const char * const pci_nic_names[] = {"i82559er" ,"rtl8139" ,"e1000" , + "e1000e",
Quoted 8 lines
hw/pci/pci.c static const char * const pci_nic_names[] = { · line 1842
Quoted 3 lines
hw/pci/pci.c +0
-0"pcnet" ,"virtio-net-pci" , "sungem",I think it would be better and more consisten to finally fix this mess and automatically allow all devices in the category
DEVICE_CATEGORY_NETWORKthat are derived fromTYPE_PCI_DEVICE, instead of manually maintaining this list here...?
Yeah, that would make sense too (virtio would be special cased). Thanks!
Paolo
PATCH 2/2 q35: change default NIC to e1000e
In reply to Paolo BonziniThe e1000 NIC is getting old and is not a very good default for a PCIe machine type. Change it to e1000e, which should be supported by a good number of guests.
--- hw/i386/pc.c | 5 +++-- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-)
hw/i386/pc.c +3 -2
@@ -1619,7 +1619,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, } } -void pc_nic_init (ISABus *isa_bus,PCIBus *pci_bus) +void pc_nic_init (ISABus *isa_bus,PCIBus *pci_bus,const char *default_model) {int i;
@@ -1630,7 +1630,8 @@ void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus)if (!pci_bus || (nd->model &&strcmp (nd->model,"ne2k_isa" ) ==0 )) {pc_init_ne2k_isa (isa_bus, nd); }else { -pci_nic_init_nofail (nd, pci_bus,"e1000" ,NULL ); +const char *model = nd->model ? nd->model : default_model; +pci_nic_init_nofail (nd, pci_bus, model,NULL ); } }rom_reset_order_override ();
hw/i386/pc_piix.c +1 -1
@@ -240,7 +240,7 @@ static void pc_init1(MachineState *machine,pc_basic_device_init (isa_bus, pcms->gsi, &rtc_state, true, (pcms->vmport !=ON_OFF_AUTO_ON ), pcms->pit,0x4 ); -pc_nic_init (isa_bus, pci_bus); +pc_nic_init (isa_bus, pci_bus,"e1000" );ide_drive_get (hd,ARRAY_SIZE (hd));if (pcmc->pci_enabled) {
hw/i386/pc_q35.c +1 -1
@@ -272,7 +272,7 @@ static void pc_q35_init(MachineState *machine)/* the rest devices to which pci devfn is automatically assigned */ pc_vga_init (isa_bus, host_bus); -pc_nic_init (isa_bus, host_bus); +pc_nic_init (isa_bus, host_bus,"e1000e" );if (pcms->acpi_nvdimm_state.is_enabled) { nvdimm_init_acpi_state(&pcms->acpi_nvdimm_state, system_io,
include/hw/i386/pc.h +1 -1
@@ -248,7 +248,7 @@ void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);void pc_cmos_init (PCMachineState *pcms,BusState *ide0,BusState *ide1,ISADevice *s); -void pc_nic_init (ISABus *isa_bus,PCIBus *pci_bus); +void pc_nic_init (ISABus *isa_bus,PCIBus *pci_bus,const char *default_model);void pc_pci_device_init (PCIBus *pci_bus);typedef void (*cpu_set_smm_t )(int smm,void *arg);
Signature · 1 line
2.14.3
Re: [Qemu-devel] [PATCH 2/2] q35: change default NIC to e1000e
Quoted 3 lines · Paolo Bonzini
The e1000 NIC is getting old and is not a very good default for a PCIe machine type. Change it to e1000e, which should be supported by a good number of guests.
Basically a good idea, but you can only do that for new machine types (pc-q35-2.12 and later), otherwise migration from an older version will fail if the user tries to migrate with the default model.
Thomas
Re: [Qemu-devel] [PATCH 2/2] q35: change default NIC to e1000e
Quoted 8 lines · Thomas Huth
Quoted 3 lines · Paolo Bonzini
The e1000 NIC is getting old and is not a very good default for a PCIe machine type. Change it to e1000e, which should be supported by a good number of guests.
Basically a good idea, but you can only do that for new machine types (pc-q35-2.12 and later), otherwise migration from an older version will fail if the user tries to migrate with the default model.
Yeah, I was just throwing out the idea.
Paolo