kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] move tpr stuff to qemu-kvm-x86.c
@ 2009-10-19 13:29 Glauber Costa
  2009-10-19 23:48 ` Avi Kivity
  2009-10-20 16:35 ` Marcelo Tosatti
  0 siblings, 2 replies; 3+ messages in thread
From: Glauber Costa @ 2009-10-19 13:29 UTC (permalink / raw)
  To: kvm; +Cc: avi

this whole tpr thing does not belong in common code. Move it to i386 specific
files.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 qemu-kvm-x86.c |    7 +++++++
 qemu-kvm.c     |    6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index db0b351..12da778 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -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;
 }
 
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 57d8b1a..54cc12d 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -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);
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] move tpr stuff to qemu-kvm-x86.c
  2009-10-19 13:29 [PATCH] move tpr stuff to qemu-kvm-x86.c Glauber Costa
@ 2009-10-19 23:48 ` Avi Kivity
  2009-10-20 16:35 ` Marcelo Tosatti
  1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-10-19 23:48 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm

On 10/19/2009 10:29 PM, Glauber Costa wrote:
> this whole tpr thing does not belong in common code. Move it to i386 specific
> files.
>
>    

Ack, but:

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

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] move tpr stuff to qemu-kvm-x86.c
  2009-10-19 13:29 [PATCH] move tpr stuff to qemu-kvm-x86.c Glauber Costa
  2009-10-19 23:48 ` Avi Kivity
@ 2009-10-20 16:35 ` Marcelo Tosatti
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2009-10-20 16:35 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, avi

On Mon, Oct 19, 2009 at 11:29:25AM -0200, Glauber Costa wrote:
> this whole tpr thing does not belong in common code. Move it to i386 specific
> files.

Applied, thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-20 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19 13:29 [PATCH] move tpr stuff to qemu-kvm-x86.c Glauber Costa
2009-10-19 23:48 ` Avi Kivity
2009-10-20 16:35 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).