[patch 1/7] qemu-kvm: move vapic enablement to kvm_arch_load_regs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



update_vapic is used for enabling vcpu's vapic on migration. 
Use the new writeback states for that.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: qemu-kvm-tpr/qemu-kvm-x86.c
===================================================================
--- qemu-kvm-tpr.orig/qemu-kvm-x86.c
+++ qemu-kvm-tpr/qemu-kvm-x86.c
@@ -988,6 +988,10 @@ void kvm_arch_load_regs(CPUState *env, i
         kvm_arch_load_mpstate(env);
         kvm_load_lapic(env);
     }
+    if (level == KVM_PUT_FULL_STATE) {
+        if (env->update_vapic)
+            kvm_tpr_enable_vapic(env);
+    }
     if (kvm_irqchip_in_kernel()) {
         /* Avoid deadlock: no user space IRQ will ever clear it. */
         env->halted = 0;
@@ -1338,9 +1342,6 @@ int kvm_arch_halt(CPUState *env)
 
 int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
 {
-    if (env->update_vapic) {
-        kvm_tpr_enable_vapic(env);
-    }
     if (!kvm_irqchip_in_kernel())
 	kvm_set_cr8(env, cpu_get_apic_tpr(env));
     return 0;


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux