[kernel] r16418 - in dists/sid/linux-2.6/debian: . patches/bugfix/x86 patches/series

Ben Hutchings benh at alioth.debian.org
Sun Oct 10 00:58:18 UTC 2010


Author: benh
Date: Sun Oct 10 00:58:10 2010
New Revision: 16418

Log:
[x86] KVM: SVM: Fix wrong intercept masks on 32 bit (Closes: #599507)

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/x86/KVM-SVM-Fix-wrong-intercept-masks-on-32-bit.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/25

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Fri Oct  8 04:41:36 2010	(r16417)
+++ dists/sid/linux-2.6/debian/changelog	Sun Oct 10 00:58:10 2010	(r16418)
@@ -9,6 +9,7 @@
     (Closes: #588551)
     - hisax: Disable device aliases that conflict with mISDN
   * Update Danish debconf template translation (Joe Hansen) (Closes: #599457)
+  * [x86] KVM: SVM: Fix wrong intercept masks on 32 bit (Closes: #599507)
 
   [ Stephen R. Marenka ]
   * m68k: fix missing io macros.

Added: dists/sid/linux-2.6/debian/patches/bugfix/x86/KVM-SVM-Fix-wrong-intercept-masks-on-32-bit.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/x86/KVM-SVM-Fix-wrong-intercept-masks-on-32-bit.patch	Sun Oct 10 00:58:10 2010	(r16418)
@@ -0,0 +1,48 @@
+From: Joerg Roedel <joerg.roedel at amd.com>
+Date: Wed, 5 May 2010 16:04:43 +0200
+Subject: [PATCH] KVM: SVM: Fix wrong intercept masks on 32 bit
+
+commit 061e2fd16863009c8005b4b5fdfb75c7215c0b99 upstream.
+
+This patch makes KVM on 32 bit SVM working again by
+correcting the masks used for iret interception. With the
+wrong masks the upper 32 bits of the intercepts are masked
+out which leaves vmrun unintercepted. This is not legal on
+svm and the vmrun fails.
+Bug was introduced by commits 95ba827313 and 3cfc3092.
+
+Cc: Jan Kiszka <jan.kiszka at siemens.com>
+Cc: Gleb Natapov <gleb at redhat.com>
+Cc: stable at kernel.org
+Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
+Signed-off-by: Avi Kivity <avi at redhat.com>
+[bwh: Adjust for 2.6.32]
+---
+ arch/x86/kvm/svm.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
+index 61ba669..52ffdc6 100644
+--- a/arch/x86/kvm/svm.c
++++ b/arch/x86/kvm/svm.c
+@@ -2111,7 +2111,7 @@ static int cpuid_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
+ static int iret_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
+ {
+ 	++svm->vcpu.stat.nmi_window_exits;
+-	svm->vmcb->control.intercept &= ~(1UL << INTERCEPT_IRET);
++	svm->vmcb->control.intercept &= ~(1ULL << INTERCEPT_IRET);
+ 	svm->vcpu.arch.hflags |= HF_IRET_MASK;
+ 	return 1;
+ }
+@@ -2506,7 +2506,7 @@ static void svm_inject_nmi(struct kvm_vcpu *vcpu)
+ 
+ 	svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_NMI;
+ 	vcpu->arch.hflags |= HF_NMI_MASK;
+-	svm->vmcb->control.intercept |= (1UL << INTERCEPT_IRET);
++	svm->vmcb->control.intercept |= (1ULL << INTERCEPT_IRET);
+ 	++vcpu->stat.nmi_injections;
+ }
+ 
+-- 
+1.7.1
+

Modified: dists/sid/linux-2.6/debian/patches/series/25
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/25	Fri Oct  8 04:41:36 2010	(r16417)
+++ dists/sid/linux-2.6/debian/patches/series/25	Sun Oct 10 00:58:10 2010	(r16418)
@@ -5,3 +5,4 @@
 + bugfix/m68k/m68k_add_missing_io_macros.patch
 + debian/isdn-i4l-mark-as-staging.patch
 + debian/hisax-Disable-device-aliases-that-conflict-with-mISDN.patch
++ bugfix/x86/KVM-SVM-Fix-wrong-intercept-masks-on-32-bit.patch



More information about the Kernel-svn-changes mailing list