[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/15] migration: savevm: consult migration blockers
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 04/15] migration: savevm: consult migration blockers |
Date: |
Mon, 26 Nov 2018 20:40:24 +0100 |
There is really no difference between live migration and savevm, except
that savevm does not require bdrv_invalidate_cache to be implemented
by all disks. However, it is unlikely that savevm is used with anything
except qcow2 disks, so the penalty is small and worth the improvement
in catching bad usage of savevm.
Only one place was taking care of savevm when adding a migration blocker,
and it can be removed.
Signed-off-by: Paolo Bonzini <address@hidden>
---
migration/savevm.c | 4 ++++
target/i386/kvm.c | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index ef707b8..1c49776 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2455,6 +2455,10 @@ int save_snapshot(const char *name, Error **errp)
struct tm tm;
AioContext *aio_context;
+ if (migration_is_blocked(errp)) {
+ return false;
+ }
+
if (!replay_can_snapshot()) {
error_setg(errp, "Record/replay does not allow making snapshot "
"right now. Try once more later.");
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 27dcca5..77e44b6 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -1265,7 +1265,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
if (!env->user_tsc_khz) {
if ((env->features[FEAT_8000_0007_EDX] & CPUID_APM_INVTSC) &&
invtsc_mig_blocker == NULL) {
- /* for migration */
error_setg(&invtsc_mig_blocker,
"State blocked by non-migratable CPU device"
" (invtsc flag)");
@@ -1275,8 +1274,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
error_free(invtsc_mig_blocker);
return r;
}
- /* for savevm */
- vmstate_x86_cpu.unmigratable = 1;
}
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/15] Misc patches for QEMU 3.1-rc3, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 01/15] target/i386: kvm: add VMX migration blocker, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 02/15] cpus: run work items for all vCPUs if single-threaded, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 03/15] lsi: Reselection needed to remove pending commands from queue, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 04/15] migration: savevm: consult migration blockers,
Paolo Bonzini <=
- [Qemu-devel] [PULL 06/15] vl: Improve error message when we can't load fw_cfg from file, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 08/15] vl.c: remove outdated comment, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 09/15] checkpatch: g_test_message does not need a trailing newline, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 10/15] target/i386: Generate #UD when applying LOCK to a register destination, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 07/15] vhost-user-bridge: fix recvmsg iovlen, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 11/15] MAINTAINERS: Add some missing entries related to accelerators, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 05/15] vmstate: constify VMStateField, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 12/15] MAINTAINERS: Add an entry for the Firmware Configuration (fw_cfg) device, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 13/15] configure: fix elf2dmp check, Paolo Bonzini, 2018/11/26
- [Qemu-devel] [PULL 14/15] hostmem-memfd: honour share=on/off property, Paolo Bonzini, 2018/11/26