[patch 7/7] kvm-tpr-opt: rename env->update_vapic

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

 



And remove the confusingly named enable_vapic function.

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

Index: qemu-kvm-tpr/kvm-tpr-opt.c
===================================================================
--- qemu-kvm-tpr.orig/kvm-tpr-opt.c
+++ qemu-kvm-tpr/kvm-tpr-opt.c
@@ -226,17 +226,11 @@ int kvm_tpr_enable_vapic(CPUState *env)
 
     kvm_enable_vapic(env, vapic_phys + (pcr_cpu << 7));
     cpu_physical_memory_rw(vapic_phys + (pcr_cpu << 7) + 4, &one, 1, 1);
-    env->update_vapic = 0;
+    env->kvm_vcpu_update_vapic = 0;
     bios_enabled = 1;
     return 1;
 }
 
-static int enable_vapic(CPUState *env)
-{
-    env->update_vapic = 1;
-    return 1;
-}
-
 static void patch_call(CPUState *env, uint64_t rip, uint32_t target)
 {
     uint32_t offset;
@@ -334,7 +328,7 @@ static int tpr_load(QEMUFile *f, void *s
         CPUState *env = first_cpu->next_cpu;
 
         for (env = first_cpu; env != NULL; env = env->next_cpu)
-            enable_vapic(env);
+            env->kvm_vcpu_update_vapic = 1;
     }
 
     return 0;
Index: qemu-kvm-tpr/qemu-kvm-x86.c
===================================================================
--- qemu-kvm-tpr.orig/qemu-kvm-x86.c
+++ qemu-kvm-tpr/qemu-kvm-x86.c
@@ -971,7 +971,7 @@ void kvm_arch_load_regs(CPUState *env, i
         kvm_load_lapic(env);
     }
     if (level == KVM_PUT_FULL_STATE) {
-        if (env->update_vapic)
+        if (env->kvm_vcpu_update_vapic)
             kvm_tpr_enable_vapic(env);
     }
     if (kvm_irqchip_in_kernel()) {
Index: qemu-kvm-tpr/target-i386/cpu.h
===================================================================
--- qemu-kvm-tpr.orig/target-i386/cpu.h
+++ qemu-kvm-tpr/target-i386/cpu.h
@@ -735,7 +735,7 @@ typedef struct CPUX86State {
     uint16_t fptag_vmstate;
     uint16_t fpregs_format_vmstate;
 
-    int update_vapic;
+    int kvm_vcpu_update_vapic;
 } CPUX86State;
 
 CPUX86State *cpu_x86_init(const char *cpu_model);


--
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