Skip to contentSkip to conversation

kvm: x86: Drop redundant apic base and tpr update from kvm_get_sregs

PATCH Applied Jan Kiszka 2 participants 2 messages Oct 26, 2011 – Nov 10, 2011 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 kvm: x86: Drop redundant apic base and tpr update from kvm_get_sregs

The latter was already commented out, the former is redundant as well. We always get the latest changes after return from the guest via kvm_arch_post_run.

---
 target-i386/kvm.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
target-i386/kvm.c +2 -3
index ddd115c..ffd6488 100644
@@ -1081,10 +1081,9 @@ static int kvm_get_sregs(CPUState *env)
     env->cr[3] = sregs.cr3;
     env->cr[4] = sregs.cr4;
 
-    cpu_set_apic_base(env->apic_state, sregs.apic_base);
-
     env->efer = sregs.efer;
-    //cpu_set_apic_tpr(env->apic_state, sregs.cr8);
+
+    /* changes to apic base and cr8/tpr are read back via kvm_arch_post_run */
 
 #define HFLAG_COPY_MASK \
     ~( HF_CPL_MASK | HF_PE_MASK | HF_MP_MASK | HF_EM_MASK | \
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 5 lines · Jan Kiszka

The latter was already commented out, the former is redundant as well. We always get the latest changes after return from the guest via kvm_arch_post_run.

Applied, thanks.