Skip to contentSkip to conversation

qemu-kvm: Drop redundant kvm_reset_mpstate

PATCH Applied Jan Kiszka 2 participants 2 messages Dec 29, 2010 – Jan 4, 2011 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 qemu-kvm: Drop redundant kvm_reset_mpstate

From: Jan Kiszka <[email protected]>

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

---
 qemu-kvm-x86.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
qemu-kvm-x86.c +0 -16
index 672bcbf..2f1a090 100644
@@ -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
#1 lore raw
Quoted 9 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 qemu-kvm-x86.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

Applied, thanks.