summaryrefslogtreecommitdiffstats
path: root/hw/i386
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-10-14 19:40:06 +0300
committerMichael S. Tsirkin <mst@redhat.com>2014-11-02 12:03:03 +0200
commit68a27b208a2328653faa09bc7a13d7ef0e2710bb (patch)
treed981e7664865fd5cf030129776f853fec84cc5c2 /hw/i386
parent4d5e17a53b12bf48953aa486d71bd1f5549c0dea (diff)
downloadhqemu-68a27b208a2328653faa09bc7a13d7ef0e2710bb.zip
hqemu-68a27b208a2328653faa09bc7a13d7ef0e2710bb.tar.gz
virtio-pci: fix migration for pci bus master
Current support for bus master (clearing OK bit) together with the need to support guests which do not enable PCI bus mastering, leads to extra state in VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust in case of cross-version migration for the case when guests use the device before setting DRIVER_OK. Rip out this code, and replace it: - Modern QEMU doesn't need VIRTIO_PCI_FLAG_BUS_MASTER_BUG so just drop it for latest machine type. - For compat machine types, set PCI_COMMAND if DRIVER_OK is set. As this is needed for 2.1 for both pc and ppc, move PC_COMPAT macros from pc.h to a new common header. Cc: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/pc_piix.c2
-rw-r--r--hw/i386/pc_q35.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 061f4d9..ddc885e 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -474,7 +474,7 @@ static QEMUMachine pc_i440fx_machine_v2_1 = {
.name = "pc-i440fx-2.1",
.init = pc_init_pci,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_2_1,
+ HW_COMPAT_2_1,
{ /* end of list */ }
},
};
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 9c44cd6..f533a94 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -370,7 +370,7 @@ static QEMUMachine pc_q35_machine_v2_1 = {
.name = "pc-q35-2.1",
.init = pc_q35_init,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_2_1,
+ HW_COMPAT_2_1,
{ /* end of list */ }
},
};
OpenPOWER on IntegriCloud