From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH 1/2] KVM: take kvm_lock for hardware_disable() during cpu hotplug Date: Thu, 18 Nov 2010 17:33:41 +0900 Message-ID: <4CE4E4E5.206@oss.ntt.co.jp> References: <20101116173244.c5d2e812.yoshikawa.takuya@oss.ntt.co.jp> <20101116173502.96ff13f3.yoshikawa.takuya@oss.ntt.co.jp> <4CE4889A.7010808@redhat.com> <4CE489A6.4010100@oss.ntt.co.jp> <4CE4908F.3050209@redhat.com> <4CE49264.8020103@oss.ntt.co.jp> <4CE4BD7E.3040406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org, takuya.yoshikawa@gmail.com To: Zachary Amsden Return-path: Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:35359 "EHLO serv2.oss.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755482Ab0KRIbR (ORCPT ); Thu, 18 Nov 2010 03:31:17 -0500 In-Reply-To: <4CE4BD7E.3040406@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: (2010/11/18 14:45), Zachary Amsden wrote: >>> No, I believe your patch is correct and the lock should be there. Did you test with spinlock debugging just to be sure? >>> >> >> Sorry but no. >> >> I have no experience with cpu hotplug. >> >> So I thought it would take too much time to do real test by myself and reported like this this time. >> >> Any easy way to test? > > Yes, quite easy. Some systems may not let cpu0 go offline, but you can manually disable and re-enable the other processors: > > [root@mysore ~]# echo "0" > /sys/devices/system/cpu/cpu1/online > [root@mysore ~]# echo "1" > /sys/devices/system/cpu/cpu1/online > > Cheers, > > Zach Thanks a lot! I tried and got a log like this: kernel: [ 422.084620] kvm: disabling virtualization on CPU1 kernel: [ 422.085757] CPU 1 is now offline kernel: [ 422.085766] lockdep: fixing up alternatives. kernel: [ 422.085780] SMP alternatives: switching to UP code kernel: [ 472.081069] lockdep: fixing up alternatives. kernel: [ 472.081080] SMP alternatives: switching to SMP code kernel: [ 472.099182] Booting Node 0 Processor 1 APIC 0x1 kernel: [ 422.104799] kvm: enabling virtualization on CPU1 Working correctly, I think. Takuya