From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: cpu hotplug Date: Mon, 20 Sep 2010 08:48:43 +0200 Message-ID: <20100920064843.GD3008@redhat.com> References: <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> <1284913473.9521.278.camel@frechmops.schnuffi.conrad.localdomain> <20100919215725.GA488@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]:16740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626Ab0ITGst (ORCPT ); Mon, 20 Sep 2010 02:48:49 -0400 Content-Disposition: inline In-Reply-To: <20100919215725.GA488@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 19, 2010 at 05:57:25PM -0400, Kevin O'Connor wrote: > On Sun, Sep 19, 2010 at 06:24:33PM +0200, Conrad Wood wrote: > > > > a script with my exact steps is below. Result is reproducible. > > > [...] > > echo "Ejecting CPU #4" > > echo "cpu_set 4 offline" | nc ${MONITORHOST} ${MONITORPORT} >/dev/null > > > > printInfo > > > > echo "Setting all available cpus to online..." > > ssh -lroot ${VM} "find /sys/devices/system/cpu/ -type f -path > > '*/cpu?/online' -exec bash -c \"echo 1 >{}\" \;" > > It's not clear if you can trust your guests or not. If you can trust > the guest OS, it should be safe to run: > > echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/LNXCPU:xx/eject > > in the guest. A normal linux guest wont reactivate the cpu after > that. > You can trust you guest more then you can trust a users of your guest. It is easy for a user to do echo, it is much harder to modify guest to not remove /sys entry for un-plugged cpu. But I agree that kvm shouldn't allow to reactivate un-plugged cpu even if it is not destroy it on un-plug. -- Gleb.