From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH 2/2] kvm tools: Bring SMP back Date: Wed, 12 Sep 2012 19:10:05 +0400 Message-ID: <20120912151005.GR15042@moon> References: <1347462216-18641-1-git-send-email-asias.hejun@gmail.com> <1347462216-18641-2-git-send-email-asias.hejun@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pekka Enberg , Sasha Levin , Ingo Molnar , kvm@vger.kernel.org To: Asias He Return-path: Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:40234 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758015Ab2ILPKK (ORCPT ); Wed, 12 Sep 2012 11:10:10 -0400 Received: by lagy9 with SMTP id y9so1181129lag.19 for ; Wed, 12 Sep 2012 08:10:08 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1347462216-18641-2-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Sep 12, 2012 at 11:03:36PM +0800, Asias He wrote: > We have this currently: > > kvm__init() > kvm__arch_setup_firmware() > mptable__init() > using kvm->nrcpus > > kvm_cpu__init() > kvm->nrcpus = kvm->cfg.nrcpus > > kvm->nrcpus is used in mptable__init() before it is initialized, so > mptable__init() will setup a wrong mp table. > > Before: > $ ./lkvm -c 4 > $ cat /proc/cpuinfo |grep ^processor|wc -l > 1 > > After: > $ ./lkvm -c 4 > $ cat /proc/cpuinfo |grep ^processor|wc -l > 4 > > Signed-off-by: Asias He Good catch!