mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu: Use correct default model on s390
Commit a68d6726679323823ee5be47f0144e9ccffa0757 breaks networking on s390 as it changes the default network card model.
This commit is contained in:
parent
c3e33e68d9
commit
d8ddf522a0
@ -678,7 +678,7 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
||||
|
||||
static int
|
||||
qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
||||
virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
virDomainDefPtr def,
|
||||
virCapsPtr caps ATTRIBUTE_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
@ -687,10 +687,16 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
||||
virQEMUDriverConfigPtr cfg = NULL;
|
||||
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_NET &&
|
||||
dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV) {
|
||||
if (!dev->data.net->model &&
|
||||
!(dev->data.net->model = strdup("rtl8139")))
|
||||
goto no_memory;
|
||||
dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
|
||||
!dev->data.net->model) {
|
||||
if (def->os.arch == VIR_ARCH_S390 ||
|
||||
def->os.arch == VIR_ARCH_S390X)
|
||||
dev->data.net->model = strdup("virtio");
|
||||
else
|
||||
dev->data.net->model = strdup("rtl8139");
|
||||
|
||||
if (!dev->data.net->model)
|
||||
goto no_memory;
|
||||
}
|
||||
|
||||
/* set default disk types and drivers */
|
||||
|
Loading…
x
Reference in New Issue
Block a user