From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: cpu hotplug Date: Sun, 19 Sep 2010 18:12:14 +0200 Message-ID: <20100919161214.GB3008@redhat.com> References: <20100919135008.GV3008@redhat.com> <1284905270.9521.221.camel@frechmops.schnuffi.conrad.localdomain> <20100919143611.GW3008@redhat.com> <1284909384.9521.228.camel@frechmops.schnuffi.conrad.localdomain> <20100919151916.GX3008@redhat.com> <1284910638.9521.242.camel@frechmops.schnuffi.conrad.localdomain> <20100919154113.GZ3008@redhat.com> <1284911040.9521.244.camel@frechmops.schnuffi.conrad.localdomain> <20100919155347.GA3008@redhat.com> <20100919160451.GA18012@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]:42330 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754518Ab0ISQMY (ORCPT ); Sun, 19 Sep 2010 12:12:24 -0400 Content-Disposition: inline In-Reply-To: <20100919160451.GA18012@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 19, 2010 at 12:04:51PM -0400, Kevin O'Connor wrote: > On Sun, Sep 19, 2010 at 05:53:47PM +0200, Gleb Natapov wrote: > > On Sun, Sep 19, 2010 at 05:44:00PM +0200, Conrad Wood wrote: > > > > > > > > However after step 7 the guest can turn the cpu online again by issuing > > > > > echo 1 >/sys/devices/.../cpuX/online > > > > There will be no /sys/devices/.../cpuX/online in guest after step 7. > > > > > > Well then at least in my version there's a bug, because it still is > > > there and never goes away. (kvm 0.12.5) > > > And changing it to online works as well. > > Can you provide exact steps you are using? After doing cpu_set x offline > > cpu x should disappear from a guest. Otherwise cpu eject didn't work. > > I'm confused. The "cpu_set x offline" doesn't appear to do anything > for me. It does not disable the cpu, nor does it inform the guest to > disable the cpu. > > The only way I'm able to remove a cpu is to run in the guest: > > echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/LNXCPU:xx/eject > > which (as far as I know) is purely a voluntary guest disable of the > cpu. It doesn't (as far as I know) even tell kvm that it is no longer > using the cpu. (The acpi cpu eject method in seabios just issues a > sleep(200) call.) > Then cpu eject method in seabios has a bug. When "cpu_set x offline" is called qemu sets status bit in gpe and injects ACPI interrupt. ACPI should do Notify() on cpu object when it happens. -- Gleb.