Bug#599507: marked as done (KVM: SVM: Fix wrong intercept masks on 32 bit)
Your message dated Thu, 25 Nov 2010 17:18:30 + with message-id e1plfso-0002ox...@franck.debian.org and subject line Bug#599507: fixed in linux-2.6 2.6.32-28 has caused the Debian Bug report #599507, regarding KVM: SVM: Fix wrong intercept masks on 32 bit to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 599507: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599507 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems ---BeginMessage--- Package: linux-2.6.32 Severity: normal When trying to reboot an ia32 guest, an ia32 kvm running on an Amd64 cpu reports the following error: kvm: unhandled exit kvm_run returned -22 This bug was fixed for linux-2.6.34 but is still present in 2.6.32. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=061e2fd16863009c8005b4b5fdfb75c7215c0b99 KVM: SVM: Fix wrong intercept masks on 32 bit 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. It only happens on Amd cpus, Intel cpus are unaffected. Please conside applying this patch to the 2.6.32 stable branch as well. Sincerely Philipp Hahn -- System Information: Debian Release: 5.0.1 Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.32-ucs11-amd64 Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) commit 061e2fd16863009c8005b4b5fdfb75c7215c0b99 Author: Joerg Roedel joerg.roe...@amd.com Date: Wed May 5 16:04:43 2010 +0200 KVM: SVM: Fix wrong intercept masks on 32 bit 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.kis...@siemens.com Cc: Gleb Natapov g...@redhat.com Cc: sta...@kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 2ba5820..737361f 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2067,7 +2067,7 @@ static int cpuid_interception(struct vcpu_svm *svm) static int iret_interception(struct vcpu_svm *svm) { ++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; } @@ -2479,7 +2479,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; } @@ -2539,10 +2539,10 @@ static void svm_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) if (masked) { svm-vcpu.arch.hflags |= HF_NMI_MASK; - svm-vmcb-control.intercept |= (1UL INTERCEPT_IRET); + svm-vmcb-control.intercept |= (1ULL INTERCEPT_IRET); } else { svm-vcpu.arch.hflags = ~HF_NMI_MASK; - svm-vmcb-control.intercept = ~(1UL INTERCEPT_IRET); + svm-vmcb-control.intercept = ~(1ULL INTERCEPT_IRET); } } signature.asc Description: Digital signature ---End Message--- ---BeginMessage--- Source: linux-2.6 Source-Version: 2.6.32-28 We believe that the bug you reported is fixed in the latest version of linux-2.6, which is due to be installed in the Debian FTP archive: firmware-linux-free_2.6.32-28_all.deb to main/l/linux-2.6/firmware-linux-free_2.6.32-28_all.deb linux-2.6_2.6.32-28.diff.gz to main/l/linux-2.6/linux-2.6_2.6.32-28.diff.gz linux-2.6_2.6.32-28.dsc to main/l/linux-2.6/linux-2.6_2.6.32-28.dsc linux-base_2.6.32-28_all.deb to main/l/linux-2.6/linux-base_2.6.32-28_all.deb linux-doc-2.6.32_2.6.32-28_all.deb to main/l/linux-2.6/linux-doc-2.6.32_2.6.32-28_all.deb linux-manual-2.6.32_2.6.32-28_all.deb to main/l/linux-2.6/linux-manual-2.6.32_2.6.32-28_all.deb linux-patch-debian-2.6.32_2.6.32-28_all.deb to main/l/linux-2.6/linux-patch-debian-2.6.32_2.6.32-28_all.deb linux-source-2.6.32_2.6.32-28_all.deb to main/l/linux-2.6/linux-source-2.6.32_2.6.32-28_all.deb linux-support-2.6.32-5_2.6.32-28_all.deb to main/l/linux-2.6/linux-support-2.6.32-5_2.6.32-28_all.deb A
Bug#599507: marked as done (KVM: SVM: Fix wrong intercept masks on 32 bit)
Your message dated Fri, 15 Oct 2010 00:12:26 + with message-id e1p6xum-0006ch...@franck.debian.org and subject line Bug#599507: fixed in linux-2.6 2.6.32-25 has caused the Debian Bug report #599507, regarding KVM: SVM: Fix wrong intercept masks on 32 bit to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 599507: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599507 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems ---BeginMessage--- Package: linux-2.6.32 Severity: normal When trying to reboot an ia32 guest, an ia32 kvm running on an Amd64 cpu reports the following error: kvm: unhandled exit kvm_run returned -22 This bug was fixed for linux-2.6.34 but is still present in 2.6.32. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=061e2fd16863009c8005b4b5fdfb75c7215c0b99 KVM: SVM: Fix wrong intercept masks on 32 bit 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. It only happens on Amd cpus, Intel cpus are unaffected. Please conside applying this patch to the 2.6.32 stable branch as well. Sincerely Philipp Hahn -- System Information: Debian Release: 5.0.1 Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.32-ucs11-amd64 Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) commit 061e2fd16863009c8005b4b5fdfb75c7215c0b99 Author: Joerg Roedel joerg.roe...@amd.com Date: Wed May 5 16:04:43 2010 +0200 KVM: SVM: Fix wrong intercept masks on 32 bit 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.kis...@siemens.com Cc: Gleb Natapov g...@redhat.com Cc: sta...@kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 2ba5820..737361f 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2067,7 +2067,7 @@ static int cpuid_interception(struct vcpu_svm *svm) static int iret_interception(struct vcpu_svm *svm) { ++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; } @@ -2479,7 +2479,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; } @@ -2539,10 +2539,10 @@ static void svm_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) if (masked) { svm-vcpu.arch.hflags |= HF_NMI_MASK; - svm-vmcb-control.intercept |= (1UL INTERCEPT_IRET); + svm-vmcb-control.intercept |= (1ULL INTERCEPT_IRET); } else { svm-vcpu.arch.hflags = ~HF_NMI_MASK; - svm-vmcb-control.intercept = ~(1UL INTERCEPT_IRET); + svm-vmcb-control.intercept = ~(1ULL INTERCEPT_IRET); } } signature.asc Description: Digital signature ---End Message--- ---BeginMessage--- Source: linux-2.6 Source-Version: 2.6.32-25 We believe that the bug you reported is fixed in the latest version of linux-2.6, which is due to be installed in the Debian FTP archive: firmware-linux-free_2.6.32-25_all.deb to main/l/linux-2.6/firmware-linux-free_2.6.32-25_all.deb linux-2.6_2.6.32-25.diff.gz to main/l/linux-2.6/linux-2.6_2.6.32-25.diff.gz linux-2.6_2.6.32-25.dsc to main/l/linux-2.6/linux-2.6_2.6.32-25.dsc linux-base_2.6.32-25_all.deb to main/l/linux-2.6/linux-base_2.6.32-25_all.deb linux-doc-2.6.32_2.6.32-25_all.deb to main/l/linux-2.6/linux-doc-2.6.32_2.6.32-25_all.deb linux-headers-2.6.32-5-486_2.6.32-25_i386.deb to main/l/linux-2.6/linux-headers-2.6.32-5-486_2.6.32-25_i386.deb linux-headers-2.6.32-5-686-bigmem_2.6.32-25_i386.deb to main/l/linux-2.6/linux-headers-2.6.32-5-686-bigmem_2.6.32-25_i386.deb linux-headers-2.6.32-5-686_2.6.32-25_i386.deb to main/l/linux-2.6/linux-headers-2.6.32-5-686_2.6.32-25_i386.deb linux-headers-2.6.32-5-all-i386_2.6.32-25_i386.deb to