Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 559

kvm-83-270.el5_11.src.rpm

From e73816148f7feebe9b7f54e0312b36775421f8e4 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Tue, 15 Sep 2009 14:58:04 -0300
Subject: [PATCH] reset hflags on cpu reset.

Message-id: <20090909102300.GA22885@redhat.com>
RH-Author: Gleb Natapov <gleb@redhat.com>
Patchwork-id: 3381
O-Subject: [PATCH] reset hflags on cpu reset.
Bugzilla: 502543
Bugzilla-related: 521749
RH-Acked-by: Avi Kivity <avi@redhat.com>
RH-Acked-by: Glauber Costa <glommer@redhat.com>
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>

hflags was added by 5dbeddc602 to track NMI window. If
cpu reset happens before NMI window opens it stay
closed after reset without this patch. Windows 2008
R2 resets cpus while they are in NMI handler.

BZ: 502543 (may be 521749 too)
Upstream status: the bug does not exists there.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			Gleb.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 arch/x86/kvm/svm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index db458c8..1b2c744 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -611,6 +611,7 @@ static void init_vmcb(struct vcpu_svm *svm)
 		save->cr4 = 0;
 	}
 	force_new_asid(&svm->vcpu);
+	svm->vcpu.arch.hflags = 0;
 }
 
 static int svm_vcpu_reset(struct kvm_vcpu *vcpu)
-- 
1.6.3.rc4.29.g8146