From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: cpu hotplug Date: Sun, 19 Sep 2010 17:41:14 +0200 Message-ID: <20100919154113.GZ3008@redhat.com> References: <20100919133134.GT3008@redhat.com> <1284903347.9521.202.camel@frechmops.schnuffi.conrad.localdomain> <20100919134045.GU3008@redhat.com> <20100919134620.GB9740@morn.localdomain> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Kevin O'Connor" , kvm@vger.kernel.org To: Conrad Wood Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1881 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754648Ab0ISPlT (ORCPT ); Sun, 19 Sep 2010 11:41:19 -0400 Content-Disposition: inline In-Reply-To: <1284910638.9521.242.camel@frechmops.schnuffi.conrad.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 19, 2010 at 05:37:18PM +0200, Conrad Wood wrote: > > > > I need to know if a cpu is currently inserted or ejected. > > > > > The only way to do that currently is to track it in your management app. > > The Management App does know which one should be inserted or ejected. > I see now way of enforcing it though. > > This is what I had in mind: (simplified) > > 1. Management App increase cpus > 2. kvm (as instructed by app): insert cpu x > 3. guest os: online cpu x > 4. do some stuff in the guest... > 5. guest os: offline cpu x > 6. Management App decrease cpus > 7. kvm (as instructed by app): eject cpu x > > 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. > If the guest does so, the Management App has no way of knowing and thus > cannot provide accurate logs - that is why it is so important. > > Conrad > > -- Gleb.