From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Alt SeaBIOS SSDT cpu hotplug Date: Wed, 7 Jul 2010 13:22:49 +0300 Message-ID: <20100707102249.GA4689@redhat.com> References: <20100707045705.GA3427@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Liu, Jinsong" , seabios@seabios.org, kvm@vger.kernel.org To: "Kevin O'Connor" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32439 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754022Ab0GGKXH (ORCPT ); Wed, 7 Jul 2010 06:23:07 -0400 Content-Disposition: inline In-Reply-To: <20100707045705.GA3427@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jul 07, 2010 at 12:57:05AM -0400, Kevin O'Connor wrote: > Hi, > > I've been playing with the cpu hotplug SSDT changes. Attached is a > proposal for an alternative method of adding ACPI support. > > The idea is to continue to build a dynamic SSDT based on CountCPUs and > MaxCountCPUs. The dynamic SSDT entries just call methods in the main > DSDT. > If it is doable and remains to be debugable it is great. > This is completely untested. Hopefully the patch will demonstrate the > idea though. > > The objective is to dynamically build an SSDT that looks something > like: > > =========================================================== > { > Scope (_SB) { > External(CPMA, MethodObj) > External(CPST, MethodObj) > External(CPEJ, MethodObj) > #define DefCPU(nr) \ > Processor (CP##nr, 0x##nr, 0x0000b010, 0x06) { \ > Name (_HID, "ACPI0007") \ > Name (ID, 0x##nr) \ > Method(_MAT, 0) { \ > Return(CPMA(ID)) \ > } \ > Method (_STA) { \ > Return(CPST(ID)) \ > } \ > Method (_EJ0, 1, NotSerialized) { \ > Return(CPEJ(ID, Arg0)) \ > } \ > } > DefCPU(00) > DefCPU(01) > DefCPU(02) > DefCPU(03) > DefCPU(AA) > Name(CPUS, Package() { > CP00, CP01, CP02, CP03, CPAA, > }) > Name(CPON, Package() { > One, One, One, Zero, Zero > }) > } > } > =========================================================== > > with a dynamic number of cpus. > > The "CPUS" package stores references to the Processor objects, and the > "CPON" package stores the state of which cpus are active. With this > info, hopefully there is no need to update the MADT tables. > The way you wrote it acpi_id is always equal to lapic_id which is not alway true. By using MADT from memory we remove this dependency from DSDT code. -- Gleb.