From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: ZhuangYanying <ann.zhuangyanying@huawei.com>
Subject: [Qemu-devel] [PULL 3/6] target-i386/machine: fix migrate faile because of Hyper-V HV_X64_MSR_VP_RUNTIME
Date: Thu, 10 Nov 2016 18:52:39 +0100 [thread overview]
Message-ID: <1478800362-18138-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1478800362-18138-1-git-send-email-pbonzini@redhat.com>
From: ZhuangYanying <ann.zhuangyanying@huawei.com>
Hyper-V HV_X64_MSR_VP_RUNTIME was introduced in linux-4.4 + qemu-2.5.
As long as the KVM module supports, qemu will save / load the
vmstate_msr_hyperv_runtime register during the migration.
Regardless of whether the hyperv_runtime configuration of x86_cpu_properties is
enabled.
The qemu-2.3 does not support this feature, of course, failed to migrate.
linux-BGSfqC:/home/qemu # ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm \
-nodefaults -machine pc-i440fx-2.3,accel=kvm,usb=off -smp 4 -m 4096 -drive \
file=/work/suse/sles11sp3.img.bak,format=raw,if=none,id=drive-virtio-disk0,cache=none \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 \
-vnc :99 -device cirrus-vga,id=video0,vgamem_mb=8,bus=pci.0,addr=0x2 -monitor vc
save_section_header:se->section_id=3,se->idstr:ram,se->instance_id=0,se->version_id=4
save_section_header:se->section_id=0,se->idstr:timer,se->instance_id=0,se->version_id=2
save_section_header:se->section_id=4,se->idstr:cpu_common,se->instance_id=0,se->version_id=1
save_section_header:se->section_id=5,se->idstr:cpu,se->instance_id=0,se->version_id=12
vmstate_subsection_save:vmsd->name:cpu/async_pf_msr
hyperv_runtime_enable_needed:env->msr_hv_runtime=128902811
vmstate_subsection_save:vmsd->name:cpu/msr_hyperv_runtime
Since hyperv_runtime is false, vm will not use hv->runtime_offset, then
vmstate_msr_hyperv_runtime is no need to transfer while migrating.
Signed-off-by: ann.zhuangyanying@huawei.com
Message-Id: <1478247398-5016-1-git-send-email-ann.zhuangyanying@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target-i386/machine.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 48037f1..760f82b 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -709,6 +709,10 @@ static bool hyperv_runtime_enable_needed(void *opaque)
X86CPU *cpu = opaque;
CPUX86State *env = &cpu->env;
+ if (!cpu->hyperv_runtime) {
+ return false;
+ }
+
return env->msr_hv_runtime != 0;
}
--
1.8.3.1
next prev parent reply other threads:[~2016-11-10 17:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 17:52 [Qemu-devel] [PULL 0/6] QEMU patches for 2.8.0-rc0 Paolo Bonzini
2016-11-10 17:52 ` [Qemu-devel] [PULL 1/6] target-i386: fix typo Paolo Bonzini
2016-11-10 17:52 ` [Qemu-devel] [PULL 2/6] vl.c: move pidfile creation up the line Paolo Bonzini
2016-11-10 17:52 ` Paolo Bonzini [this message]
2016-11-10 17:52 ` [Qemu-devel] [PULL 4/6] qdev: fix use-after-free regression from becdfa00cfa Paolo Bonzini
2016-11-10 17:52 ` [Qemu-devel] [PULL 5/6] target-i386: document how x86 gdb_num_core_regs is computed Paolo Bonzini
2016-11-10 17:52 ` [Qemu-devel] [PULL 6/6] nbd: Don't inf-loop on early EOF Paolo Bonzini
2016-11-11 12:51 ` [Qemu-devel] [PULL 0/6] QEMU patches for 2.8.0-rc0 Stefan Hajnoczi
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=1478800362-18138-4-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=ann.zhuangyanying@huawei.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).