From: Marcelo Tosatti <[email protected]> And remove the confusingly named enable_vapic function.
Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Avi Kivity <[email protected]> diff --git a/kvm-tpr-opt.c b/kvm-tpr-opt.c index 6a607f2..429c2f4 100644 --- a/kvm-tpr-opt.c +++ b/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, int version_id) 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; diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index ad217bf..0160fe9 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1003,7 +1003,7 @@ void kvm_arch_load_regs(CPUState *env, int level) 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()) { diff --git a/target-i386/cpu.h b/target-i386/cpu.h index b64bd02..f83d1d5 100644 --- a/target-i386/cpu.h +++ b/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-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
