From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [PATCH 21/35] kvm: x86: Fix xcr0 reset mismerge Date: Thu, 6 Jan 2011 15:56:27 -0200 Message-ID: References: Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Jan Kiszka , Marcelo Tosatti To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31398 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130Ab1AFSDc (ORCPT ); Thu, 6 Jan 2011 13:03:32 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: From: Jan Kiszka 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 Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 1403327..e46b901 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -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; @@ -1756,8 +1757,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 */ -- 1.7.2.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33016 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PauBM-000409-V1 for qemu-devel@nongnu.org; Thu, 06 Jan 2011 13:03:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PauBE-0006fT-CA for qemu-devel@nongnu.org; Thu, 06 Jan 2011 13:03:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PauBE-0006eX-5I for qemu-devel@nongnu.org; Thu, 06 Jan 2011 13:03:20 -0500 From: Marcelo Tosatti Date: Thu, 6 Jan 2011 15:56:27 -0200 Message-Id: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 21/35] kvm: x86: Fix xcr0 reset mismerge List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org From: Jan Kiszka 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 Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 1403327..e46b901 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -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; @@ -1756,8 +1757,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 */ -- 1.7.2.3