diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-08-19 17:26:55 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-08-21 00:18:39 +0300 |
commit | 04920fc0faa4760f9c4fc0e73b992b768099be70 (patch) | |
tree | 90921644ff0d58e6e165cc439321328e5d771256 /hw/i386/pc_q35.c | |
parent | 0851c9f75ccb0baf28f5bf901b9ffe3c91fcf969 (diff) |
loader: store FW CFG ROM files in RAM
ROM files that are put in FW CFG are copied to guest ram, by BIOS, but
they are not backed by RAM so they don't get migrated.
Each time we change two bytes in such a ROM this breaks cross-version
migration: since we can migrate after BIOS has read the first byte but
before it has read the second one, getting an inconsistent state.
Future-proof this by creating, for each such ROM,
an MR serving as the backing store.
This MR is never mapped into guest memory, but it's registered
as RAM so it's migrated with the guest.
Naturally, this only helps for -M 1.7 and up, older machine types
will still have the cross-version migration bug.
Luckily the race window for the problem to trigger is very small,
which is also likely why we didn't notice the cross-version
migration bug in testing yet.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'hw/i386/pc_q35.c')
-rw-r--r-- | hw/i386/pc_q35.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index ab0aa70b71..533a2d6769 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -28,6 +28,7 @@ * THE SOFTWARE. */ #include "hw/hw.h" +#include "hw/loader.h" #include "sysemu/arch_init.h" #include "hw/i2c/smbus.h" #include "hw/boards.h" @@ -221,6 +222,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args) static void pc_q35_init_1_6(QEMUMachineInitArgs *args) { has_pci_info = false; + rom_file_in_ram = false; pc_q35_init(args); } |