From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
Theodore Ts'o <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, kvm-devel@lists.sourceforge.net,
Marko Kohtala <marko.kohtala@gmail.com>,
Avi Kivity <avi@qumranet.com>
Subject: [patch 22/60] KVM: Fix hang on uniprocessor
Date: Wed, 12 Dec 2007 22:52:04 -0800 [thread overview]
Message-ID: <20071213065204.GW6867@kroah.com> (raw)
In-Reply-To: <20071213065039.GA6867@kroah.com>
[-- Attachment #1: kvm-fix-hang-on-uniprocessor.patch --]
[-- Type: text/plain, Size: 1062 bytes --]
2.6.23-stable review patch. If anyone has any objections, please let us
know.
------------------
From: Marko Kohtala <marko.kohtala@gmail.com>
This is not in mainline, as it was fixed differently in that tree.
first_cpu(cpus) returns the only CPU when NR_CPUS is 1 regardless of
the cpus mask. Therefore we avoid a kernel hang in
KVM_SET_MEMORY_REGION ioctl on uniprocessor by not entering the loop at
all.
Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/kvm/kvm_main.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -273,6 +273,11 @@ void kvm_flush_remote_tlbs(struct kvm *k
}
}
+ /* Uniprocessor kernel does not respect cpus in first_cpu. So
+ * do not go there if we have nothing to do. */
+ if (cpus_empty(cpus))
+ return;
+
/*
* We really want smp_call_function_mask() here. But that's not
* available, so ipi all cpus in parallel and wait for them
--
next prev parent reply other threads:[~2007-12-13 6:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071213064518.328162328@mini.kroah.org>
[not found] ` <20071213065039.GA6867@kroah.com>
2007-12-13 6:52 ` [patch 21/60] KVM: x86 emulator: Use emulator_write_emulated and not emulator_write_std Greg KH
2007-12-13 6:52 ` Greg KH [this message]
2007-12-13 6:52 ` [patch 23/60] KVM: SVM: Fix FPU leak while emulating clts Greg KH
2007-12-13 6:52 ` [patch 25/60] KVM: VMX: Force vm86 mode if setting flags during real mode Greg KH
[not found] ` <20071213065039.GA6867-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2007-12-13 6:51 ` [patch 17/60] KVM: x86 emulator: implement movnti mem, reg Greg KH
2007-12-13 6:51 ` [patch 18/60] KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3 Greg KH
2007-12-13 6:51 ` [patch 19/60] KVM: x86 emulator: invd instruction Greg KH
2007-12-13 6:51 ` [patch 20/60] KVM: SVM: Intercept the invd and wbinvd instructions Greg KH
2007-12-13 6:52 ` [patch 24/60] KVM: Skip pio instruction when it is emulated, not executed Greg KH
2007-12-13 6:52 ` [patch 26/60] KVM: VMX: Reset mmu context when entering real mode Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071213065204.GW6867@kroah.com \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=avi@qumranet.com \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=jmforbes@linuxtx.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marko.kohtala@gmail.com \
--cc=mkrufky@linuxtv.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=zwane@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox