summaryrefslogtreecommitdiffstats
path: root/include/hw
diff options
context:
space:
mode:
authorIgor Mammedov2017-04-25 17:37:50 +0200
committerMichael S. Tsirkin2017-05-10 21:04:23 +0200
commit98e753a6e51b255d474c4db5e7af8b01633b6a4c (patch)
treeed8ac7b99975f87421d8977188ba4d980d1e3fbd /include/hw
parentlibvhost-user: fix crash when rings aren't ready (diff)
downloadqemu-98e753a6e51b255d474c4db5e7af8b01633b6a4c.tar.gz
qemu-98e753a6e51b255d474c4db5e7af8b01633b6a4c.tar.xz
qemu-98e753a6e51b255d474c4db5e7af8b01633b6a4c.zip
pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot
Since 2.7 commit (b2a575a Add optionrom compatible with fw_cfg DMA version) regressed migration during firmware exection time by abusing fwcfg.dma_enabled property to decide loading dma version of option rom AND by mistake disabling DMA for 2.6 and earlier globally instead of only for option rom. so 2.6 machine type guest is broken when it already runs firmware in DMA mode but migrated to qemu-2.7(pc-2.6) at that time; a) qemu-2.6:pc2.6 (fwcfg.dma=on,firmware=dma,oprom=ioport) b) qemu-2.7:pc2.6 (fwcfg.dma=off,firmware=ioport,oprom=ioport) to: a b from a OK FAIL b OK OK So we currently have broken forward migration from qemu-2.6 to qemu-2.[789] that however could be fixed for 2.10 by re-enabling DMA for 2.[56] machine types and allowing dma capable option rom only since 2.7. As result qemu should end up with: c) qemu-2.10:pc2.6 (fwcfg.dma=on,firmware=dma,oprom=ioport) to: a b c from a OK FAIL OK b OK OK OK c OK FAIL OK where forward migration from qemu-2.6 to qemu-2.10 should work again leaving only qemu-2.[789]:pc-2.6 broken. Reported-by: Eduardo Habkost <ehabkost@redhat.com> Analyzed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/i386/pc.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 416aaa56ea..d0183c4890 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -151,6 +151,9 @@ struct PCMachineClass {
bool save_tsc_khz;
/* generate legacy CPU hotplug AML */
bool legacy_cpu_hotplug;
+
+ /* use DMA capable linuxboot option rom */
+ bool linuxboot_dma_enabled;
};
#define TYPE_PC_MACHINE "generic-pc-machine"
@@ -438,10 +441,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_6 \
HW_COMPAT_2_6 \
{\
- .driver = "fw_cfg_io",\
- .property = "dma_enabled",\
- .value = "off",\
- },{\
.driver = TYPE_X86_CPU,\
.property = "cpuid-0xb",\
.value = "off",\