kvm: x86: Fix xcr0 reset mismerge
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 21 Jan 2011 20:48:12 +0000 (21:48 +0100)
committerMarcelo Tosatti <mtosatti@redhat.com>
Sun, 23 Jan 2011 04:27:21 +0000 (02:27 -0200)
For unknown reasons, xcr0 reset ended up in kvm_arch_update_guest_debug
on upstream merge. Fix this and also remove the misleading comment (1 is
THE reset value).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
target-i386/kvm.c

index 07c75c00ad1bcc33ceb8d73808d913ff9a1d27c0..c4a22dd58f2d63616a718713c07371a5541e7148 100644 (file)
@@ -450,6 +450,7 @@ void kvm_arch_reset_vcpu(CPUState *env)
     env->interrupt_injected = -1;
     env->nmi_injected = 0;
     env->nmi_pending = 0;
+    env->xcr0 = 1;
     if (kvm_irqchip_in_kernel()) {
         env->mp_state = cpu_is_bsp(env) ? KVM_MP_STATE_RUNNABLE :
                                           KVM_MP_STATE_UNINITIALIZED;
@@ -1759,8 +1760,6 @@ void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg)
                 ((uint32_t)len_code[hw_breakpoint[n].len] << (18 + n*4));
         }
     }
-    /* Legal xcr0 for loading */
-    env->xcr0 = 1;
 }
 #endif /* KVM_CAP_SET_GUEST_DEBUG */