From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: cpu hotplug Date: Tue, 21 Sep 2010 11:38:49 +0200 Message-ID: <20100921093849.GA11145@redhat.com> References: <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> <20100919161214.GB3008@redhat.com> <20100919220331.GB488@morn.localdomain> <20100920065017.GE3008@redhat.com> <20100921010716.GD16648@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: "Kevin O'Connor" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:30045 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757219Ab0IUJiw (ORCPT ); Tue, 21 Sep 2010 05:38:52 -0400 Content-Disposition: inline In-Reply-To: <20100921010716.GD16648@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Sep 20, 2010 at 09:07:16PM -0400, Kevin O'Connor wrote: > On Mon, Sep 20, 2010 at 08:50:17AM +0200, Gleb Natapov wrote: > > On Sun, Sep 19, 2010 at 06:03:31PM -0400, Kevin O'Connor wrote: > > > I was wrong. The "cpu_set x offline" does send an event to the guest > > > OS. SeaBIOS even forwards the event along - as far as I can tell a > > > Notify(CPxx, 3) event is generated by SeaBIOS. > > > > > > My Windows 7 ultimate beta seems to receive the event okay (it pops up > > > a dialog box which says you can't unplug cpus). > > > > > It may react to Eject() method. > > The eject method is called by the OS to notify the host. Right now > SeaBIOS's eject method doesn't do anything. > > > > Unfortunately, my test linux guest OS (FC13) doesn't seem to do > > > anything with the unplug Notify event. I've tried with the original > > > FC13 and with a fully updated version - no luck. > > > > > > So, I'm guessing this has something to do with the guest OS. > > > > > Can you verify that _STA() return zero after cpu unplug? > > I've verified that. I've also verified that Linux doesn't call the > _STA method after Notify(CPxx, 3). It does call _STA on startup and > after a Notify(CPxx, 1) event. So, the Linux kernel in my FC13 guest > just seems to be ignoring Notify(3) events. (According to ACPI spec, > the guest should shutdown the cpu and then call the eject method.) > To remove cpu completely you need to eject it from the guest: echo 1 > /sys/bus/acpi/drivers/processor/LNXCPU\:03/eject I didn't found a way to trigger this from a host. May be with some udev magic it can be done. -- Gleb.