* [patch] KVM: fix vcpu_clear() bug
@ 2007-01-30 9:01 Ingo Molnar
[not found] ` <20070130090155.GA18469-X9Un+BFzKDI@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Molnar @ 2007-01-30 9:01 UTC (permalink / raw)
To: kvm-devel
Subject: [patch] KVM: fix vcpu_clear() bug
From: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
if vcpu_clear() is called on a not yet run vcpu then vcpu->cpu will be
-1. Check this case and dont call smp_call_function_single(-1).
this patch fixes the crash i reported earlier and -trunk now works fine
on a 32-bit SMP host.
Signed-off-by: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
---
drivers/kvm/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/kvm/vmx.c
===================================================================
--- linux.orig/drivers/kvm/vmx.c
+++ linux/drivers/kvm/vmx.c
@@ -127,7 +127,7 @@ static void __vcpu_clear(void *arg)
static void vcpu_clear(struct kvm_vcpu *vcpu)
{
- if (vcpu->cpu != raw_smp_processor_id())
+ if (vcpu->cpu != raw_smp_processor_id() && vcpu->cpu != -1)
smp_call_function_single(vcpu->cpu, __vcpu_clear, vcpu, 0, 1);
else
__vcpu_clear(vcpu);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-30 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-30 9:01 [patch] KVM: fix vcpu_clear() bug Ingo Molnar
[not found] ` <20070130090155.GA18469-X9Un+BFzKDI@public.gmane.org>
2007-01-30 12:58 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox