public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: Drop redundant kvm_reset_mpstate
@ 2010-12-29 18:53 Jan Kiszka
  2011-01-04 18:40 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2010-12-29 18:53 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm

From: Jan Kiszka <jan.kiszka@siemens.com>

kvm_arch_reset_vcpu includes the same logic (minus the obsolete feature
check), and every caller of kvm_reset_mpstate also calls that function.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 qemu-kvm-x86.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 672bcbf..2f1a090 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -564,20 +564,6 @@ static void kvm_arch_load_mpstate(CPUState *env)
 #endif
 }
 
-static void kvm_reset_mpstate(CPUState *env)
-{
-#ifdef KVM_CAP_MP_STATE
-    if (kvm_check_extension(kvm_state, KVM_CAP_MP_STATE)) {
-        if (kvm_irqchip_in_kernel()) {
-            env->mp_state = cpu_is_bsp(env) ? KVM_MP_STATE_RUNNABLE :
-                                              KVM_MP_STATE_UNINITIALIZED;
-        } else {
-            env->mp_state = KVM_MP_STATE_RUNNABLE;
-        }
-    }
-#endif
-}
-
 #define XSAVE_CWD_RIP     2
 #define XSAVE_CWD_RDP     4
 #define XSAVE_MXCSR       6
@@ -652,7 +638,6 @@ static int _kvm_arch_init_vcpu(CPUState *env)
 #ifdef KVM_EXIT_TPR_ACCESS
     kvm_enable_tpr_access_reporting(env);
 #endif
-    kvm_reset_mpstate(env);
     return 0;
 }
 
@@ -761,7 +746,6 @@ void kvm_arch_cpu_reset(CPUState *env)
 {
     kvm_reset_msrs(env);
     kvm_arch_reset_vcpu(env);
-    kvm_reset_mpstate(env);
 }
 
 #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT

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

* Re: [PATCH] qemu-kvm: Drop redundant kvm_reset_mpstate
  2010-12-29 18:53 [PATCH] qemu-kvm: Drop redundant kvm_reset_mpstate Jan Kiszka
@ 2011-01-04 18:40 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2011-01-04 18:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Avi Kivity, kvm

On Wed, Dec 29, 2010 at 07:53:39PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> kvm_arch_reset_vcpu includes the same logic (minus the obsolete feature
> check), and every caller of kvm_reset_mpstate also calls that function.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  qemu-kvm-x86.c |   16 ----------------
>  1 files changed, 0 insertions(+), 16 deletions(-)

Applied, thanks.


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

end of thread, other threads:[~2011-01-04 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-29 18:53 [PATCH] qemu-kvm: Drop redundant kvm_reset_mpstate Jan Kiszka
2011-01-04 18:40 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox