diff options
author | Gleb Natapov | 2010-10-24 14:27:55 +0200 |
---|---|---|
committer | Anthony Liguori | 2010-11-16 15:40:07 +0100 |
commit | f6584ee20338a74ef3b05b38b8f9dc5e7a7276a6 (patch) | |
tree | ec4c09daf1b3af9109ba04c2834e7bb5c60956c9 /target-i386/kvm.c | |
parent | tap: clear vhost_net backend on cleanup (diff) | |
download | qemu-f6584ee20338a74ef3b05b38b8f9dc5e7a7276a6.tar.gz qemu-f6584ee20338a74ef3b05b38b8f9dc5e7a7276a6.tar.xz qemu-f6584ee20338a74ef3b05b38b8f9dc5e7a7276a6.zip |
Add support for async page fault to qemu
Add save/restore of MSR for migration and cpuid bit.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r-- | target-i386/kvm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index ae0a034ab0..7dfc357e42 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -162,6 +162,9 @@ struct kvm_para_features { #ifdef KVM_CAP_PV_MMU { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP }, #endif +#ifdef KVM_CAP_ASYNC_PF + { KVM_CAP_ASYNC_PF, KVM_FEATURE_ASYNC_PF }, +#endif { -1, -1 } }; @@ -838,6 +841,9 @@ static int kvm_put_msrs(CPUState *env, int level) kvm_msr_entry_set(&msrs[n++], MSR_KVM_SYSTEM_TIME, env->system_time_msr); kvm_msr_entry_set(&msrs[n++], MSR_KVM_WALL_CLOCK, env->wall_clock_msr); +#ifdef KVM_CAP_ASYNC_PF + kvm_msr_entry_set(&msrs[n++], MSR_KVM_ASYNC_PF_EN, env->async_pf_en_msr); +#endif } #ifdef KVM_CAP_MCE if (env->mcg_cap) { @@ -1064,6 +1070,9 @@ static int kvm_get_msrs(CPUState *env) #endif msrs[n++].index = MSR_KVM_SYSTEM_TIME; msrs[n++].index = MSR_KVM_WALL_CLOCK; +#ifdef KVM_CAP_ASYNC_PF + msrs[n++].index = MSR_KVM_ASYNC_PF_EN; +#endif #ifdef KVM_CAP_MCE if (env->mcg_cap) { @@ -1135,6 +1144,11 @@ static int kvm_get_msrs(CPUState *env) } #endif break; +#ifdef KVM_CAP_ASYNC_PF + case MSR_KVM_ASYNC_PF_EN: + env->async_pf_en_msr = msrs[i].data; + break; +#endif } } |