From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: cpu hotplug Date: Sun, 19 Sep 2010 15:50:08 +0200 Message-ID: <20100919135008.GV3008@redhat.com> References: <1284759576.9521.137.camel@frechmops.schnuffi.conrad.localdomain> <20100918143259.GA30158@morn.localdomain> <1284834474.9521.161.camel@frechmops.schnuffi.conrad.localdomain> <20100919063812.GN3008@redhat.com> <20100919132617.GA9143@morn.localdomain> <1284902975.9521.199.camel@frechmops.schnuffi.conrad.localdomain> <20100919133134.GT3008@redhat.com> <1284903347.9521.202.camel@frechmops.schnuffi.conrad.localdomain> <20100919134045.GU3008@redhat.com> <20100919134620.GB9740@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Conrad Wood , kvm@vger.kernel.org To: "Kevin O'Connor" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51646 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754000Ab0ISNuP (ORCPT ); Sun, 19 Sep 2010 09:50:15 -0400 Content-Disposition: inline In-Reply-To: <20100919134620.GB9740@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 19, 2010 at 09:46:21AM -0400, Kevin O'Connor wrote: > On Sun, Sep 19, 2010 at 03:40:45PM +0200, Gleb Natapov wrote: > > halted state is not the way to check for whether cpu is online or > > offline. cpu may be online but executing hlt instruction so > > its state will be halted, but cpu itself is online. Actually with kvm > > today you are not able to check that cpu is offline if it was ever > > online. Query a guest for cpu status. > > In that regard, "info cpus" does seem to work - as it only shows me > the cpus that have ever been online. Ejecting a cpu in the guest does > not remove it from "info cpus", but then, I don't think kvm does > remove it from being available after an eject. > Exactly. That what I meant by "Actually with kvm today you are not able to check that cpu is offline if it was ever online". So if cpu was never online it is easy to check that it is offline (it will not be reported by "info cpus"). But if it was inserted and then ejected it will still be present in "info cpus", but not used by a guest OS. -- Gleb.