qemu-kvm/kvm-x86-machine-types-q35-F...

58 lines
2.0 KiB
Diff

From 9de83a880cf0e397db7c8bfdbf009f137c8eaf8a Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Date: Wed, 31 Jul 2019 15:08:11 +0100
Subject: [PATCH 2/6] x86 machine types: q35: Fixup units_per_default_bus
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: <20190731150814.29571-3-dgilbert@redhat.com>
Patchwork-id: 89818
O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH v3 2/5] x86 machine types: q35: Fixup units_per_default_bus
Bugzilla: 1719649
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
x86 machine types: q35: Fixup units_per_default_bus
We omitted the line:
m->units_per_default_bus = 1;
in our rebase from 2.1.2 (which doesn't have ->units_per_default_bus)
to 2.3.0 (which does). Specifically, in commit ed6d215ef93.
It's safe for us to add, because:
a) It changes the behaviour when you don't specify a bus/device
number, however libvirt always specifies it, so it's always
safe downstream for us with libvirt which we require.
b) The behaviour change isn't actually seen by the guest. i.e.
the change from having two SATA devices from:
ide0-hd0, ide0-hd1
to
ide0-hd0, ide1-hd0
is hidden because by the time it gets through the SATA code
it ends up back as two single SATA devices on their own bus.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/i386/pc_q35.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 4959ed3..068813d 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -549,6 +549,7 @@ static void pc_q35_machine_rhel_options(MachineClass *m)
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pcmc->default_nic_model = "e1000e";
m->family = "pc_q35_Z";
+ m->units_per_default_bus = 1;
m->default_machine_opts = "firmware=bios-256k.bin";
m->default_display = "std";
m->no_floppy = 1;
--
1.8.3.1