move tpr stuff to qemu-kvm-x86.c
PATCH 1/1 move tpr stuff to qemu-kvm-x86.c
this whole tpr thing does not belong in common code. Move it to i386 specific files.
Signed-off-by Glauber Costa <[email protected]>
--- qemu-kvm-x86.c | 7 +++++++ qemu-kvm.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-)
qemu-kvm-x86.c +7 -0
@@ -157,6 +157,10 @@ int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes,if (r <0 )return r; +#ifdef KVM_EXIT_TPR_ACCESS +kvm_tpr_opt_setup (); +#endif +return 0 ; }
@@ -1305,6 +1309,9 @@ int kvm_arch_init_vcpu(CPUState *cenv) }#endif +#ifdef KVM_EXIT_TPR_ACCESS +kvm_tpr_vcpu_start (cenv); +#endif return 0 ; }
qemu-kvm.c +0 -6
@@ -1865,9 +1865,6 @@ static int kvm_main_loop_cpu(CPUState *env)pthread_mutex_lock (&qemu_mutex);kvm_arch_init_vcpu (env); -#ifdef TARGET_I386 -kvm_tpr_vcpu_start (env); -#endif cpu_single_env = env;kvm_arch_load_regs (env);
@@ -1960,9 +1957,6 @@ int kvm_init_ap(void) {struct sigaction action; -#ifdef TARGET_I386 -kvm_tpr_opt_setup (); -#endif qemu_add_vm_change_state_handler (kvm_vm_state_change_handler,NULL );signal (SIG_IPI , sig_ipi_handler);
Signature · 1 line
1.6.2.5
Quoted 4 lines · Glauber Costa
this whole tpr thing does not belong in common code. Move it to i386 specific files.
Ack, but:
qemu-kvm-x86.c int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes, · line 164
Quoted 9 lines
qemu-kvm-x86.c +4
-0@@ -157,6 +157,10 @@ int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes,if (r<0 )return r; +#ifdef KVM_EXIT_TPR_ACCESS +kvm_tpr_opt_setup (); +#endif +
Wierd indentation.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Marcelo Tosatti
AppliedQuoted 2 lines · Glauber Costa
this whole tpr thing does not belong in common code. Move it to i386 specific files.
Applied, thanks.