[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/21] Disable section footers on older machine types
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 17/21] Disable section footers on older machine types |
Date: |
Fri, 12 Jun 2015 07:03:46 +0200 |
From: "Dr. David Alan Gilbert" <address@hidden>
The next patch adds section footers; but we don't want to
break migration compatibility so disable them on older
machine types
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
hw/i386/pc_piix.c | 2 ++
hw/i386/pc_q35.c | 2 ++
include/migration/migration.h | 2 +-
migration/savevm.c | 7 +++++++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 5253e6d..e142f75 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -52,6 +52,7 @@
#ifdef CONFIG_XEN
# include <xen/hvm/hvm_info_table.h>
#endif
+#include "migration/migration.h"
#define MAX_IDE_BUS 2
@@ -305,6 +306,7 @@ static void pc_init1(MachineState *machine)
static void pc_compat_2_3(MachineState *machine)
{
+ savevm_skip_section_footers();
}
static void pc_compat_2_2(MachineState *machine)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 110dfb7..b68263d 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -45,6 +45,7 @@
#include "hw/usb.h"
#include "hw/cpu/icc_bus.h"
#include "qemu/error-report.h"
+#include "migration/migration.h"
/* ICH9 AHCI has 6 ports */
#define MAX_SATA_PORTS 6
@@ -289,6 +290,7 @@ static void pc_q35_init(MachineState *machine)
static void pc_compat_2_3(MachineState *machine)
{
+ savevm_skip_section_footers();
}
static void pc_compat_2_2(MachineState *machine)
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 720a949..7bdaf55 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -194,6 +194,6 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t
block_offset,
ram_addr_t offset, size_t size,
uint64_t *bytes_sent);
-
void ram_mig_init(void);
+void savevm_skip_section_footers(void);
#endif
diff --git a/migration/savevm.c b/migration/savevm.c
index 2942ed6..80c4389 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -55,6 +55,8 @@
#define ARP_PTYPE_IP 0x0800
#define ARP_OP_REQUEST_REV 0x3
+static bool skip_section_footers;
+
static int announce_self_create(uint8_t *buf,
uint8_t *mac_addr)
{
@@ -611,6 +613,11 @@ static void vmstate_save(QEMUFile *f, SaveStateEntry *se,
QJSON *vmdesc)
vmstate_save_state(f, se->vmsd, se->opaque, vmdesc);
}
+void savevm_skip_section_footers(void)
+{
+ skip_section_footers = true;
+}
+
/*
* Write the header for device section (QEMU_VM_SECTION START/END/PART/FULL)
*/
--
2.4.3
- [Qemu-devel] [PULL 08/21] migration: create savevm_state, (continued)
- [Qemu-devel] [PULL 08/21] migration: create savevm_state, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 01/21] migration: move ram stuff to migration/ram, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 10/21] Add qemu_get_counted_string to read a string prefixed by a count byte, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 11/21] Split header writing out of qemu_savevm_state_begin, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 12/21] qemu_ram_foreach_block: pass up error value, and down the ramblock name, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 09/21] migration: Use normal VMStateDescriptions for Subsections, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 13/21] Create MigrationIncomingState, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 14/21] Move copy out of qemu_peek_buffer, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 15/21] Move loadvm_handlers into MigrationIncomingState, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 16/21] Merge section header writing, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 17/21] Disable section footers on older machine types,
Juan Quintela <=
- [Qemu-devel] [PULL 18/21] Add a protective section footer, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 19/21] Teach analyze-migration.py about section footers, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 20/21] Rename RDMA structures to make destination clear, Juan Quintela, 2015/06/12
- [Qemu-devel] [PULL 21/21] Remove unneeded memset, Juan Quintela, 2015/06/12
- Re: [Qemu-devel] [PULL v2 00/21] migration pull request, Peter Maydell, 2015/06/12