summaryrefslogtreecommitdiff
path: root/target-i386/machine.c
diff options
context:
space:
mode:
authorVadim Rozenfeld <vrozenfe@redhat.com>2014-01-24 00:40:48 +1100
committerPaolo Bonzini <pbonzini@redhat.com>2014-02-03 17:33:55 +0100
commit5ef68987e5671edf5f51f845d1bbf3e5759a8526 (patch)
treebe0504035a9595a9bd0caf382a1c52568a16873e /target-i386/machine.c
parent1c90ef2619dd6e5c4fec7e9e18c04c0a08e93aac (diff)
downloadqemu-5ef68987e5671edf5f51f845d1bbf3e5759a8526.tar.gz
qemu-5ef68987e5671edf5f51f845d1bbf3e5759a8526.tar.bz2
qemu-5ef68987e5671edf5f51f845d1bbf3e5759a8526.zip
kvm: make hyperv vapic assist page migratable
Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 96fd0454d2..e72e27092f 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -574,6 +574,25 @@ static const VMStateDescription vmstate_msr_hypercall_hypercall = {
}
};
+static bool hyperv_vapic_enable_needed(void *opaque)
+{
+ X86CPU *cpu = opaque;
+ CPUX86State *env = &cpu->env;
+
+ return env->msr_hv_vapic != 0;
+}
+
+static const VMStateDescription vmstate_msr_hyperv_vapic = {
+ .name = "cpu/msr_hyperv_vapic",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .minimum_version_id_old = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_UINT64(env.msr_hv_vapic, X86CPU),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
const VMStateDescription vmstate_x86_cpu = {
.name = "cpu",
.version_id = 12,
@@ -711,6 +730,9 @@ const VMStateDescription vmstate_x86_cpu = {
}, {
.vmsd = &vmstate_msr_hypercall_hypercall,
.needed = hyperv_hypercall_enable_needed,
+ }, {
+ .vmsd = &vmstate_msr_hyperv_vapic,
+ .needed = hyperv_vapic_enable_needed,
} , {
/* empty */
}