From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, agraf@suse.de, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 2/4] Disable section footers on older machine types
Date: Tue, 19 May 2015 12:29:51 +0100 [thread overview]
Message-ID: <1432034993-24431-3-git-send-email-dgilbert@redhat.com> (raw)
In-Reply-To: <1432034993-24431-1-git-send-email-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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 <dgilbert@redhat.com>
---
hw/i386/pc_piix.c | 2 ++
hw/i386/pc_q35.c | 2 ++
include/migration/migration.h | 1 +
savevm.c | 7 +++++++
4 files changed, 12 insertions(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 212e263..dd4c826 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
@@ -312,6 +313,7 @@ static void pc_init_pci(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 e67f2de..3fea169 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
@@ -291,6 +292,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 a6e025a..9afee02 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -180,4 +180,5 @@ 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 savevm_skip_section_footers(void);
#endif
diff --git a/savevm.c b/savevm.c
index edb8f33..415914f 100644
--- a/savevm.c
+++ b/savevm.c
@@ -51,6 +51,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)
{
@@ -602,6 +604,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.1
next prev parent reply other threads:[~2015-05-19 11:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 11:29 [Qemu-devel] [PATCH 0/4] Add section footers to detect corrupted migration streams Dr. David Alan Gilbert (git)
2015-05-19 11:29 ` [Qemu-devel] [PATCH 1/4] Merge section header writing Dr. David Alan Gilbert (git)
2015-05-20 8:50 ` Juan Quintela
2015-05-19 11:29 ` Dr. David Alan Gilbert (git) [this message]
2015-05-20 8:52 ` [Qemu-devel] [PATCH 2/4] Disable section footers on older machine types Juan Quintela
2015-05-20 17:02 ` Dr. David Alan Gilbert
2015-05-19 11:29 ` [Qemu-devel] [PATCH 3/4] Add a protective section footer Dr. David Alan Gilbert (git)
2015-05-20 8:53 ` Juan Quintela
2015-05-19 11:29 ` [Qemu-devel] [PATCH 4/4] Teach analyze-migration.py about section footers Dr. David Alan Gilbert (git)
2015-05-19 13:51 ` [Qemu-devel] [PATCH 0/4] Add section footers to detect corrupted migration streams Eric Blake
2015-05-19 14:06 ` Dr. David Alan Gilbert
2015-05-19 14:13 ` Eric Blake
2015-05-19 14:28 ` Dr. David Alan Gilbert
2015-05-19 14:40 ` Eric Blake
2015-05-20 8:58 ` Juan Quintela
2015-05-20 7:13 ` Amit Shah
2015-05-20 7:18 ` Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432034993-24431-3-git-send-email-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=agraf@suse.de \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.