All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Kevin O'Connor" <kevin@koconnor.net>
Cc: "Liu, Jinsong" <jinsong.liu@intel.com>,
	Gleb Natapov <gleb@redhat.com>,
	seabios@seabios.org, kvm@vger.kernel.org
Subject: Re: Alt SeaBIOS SSDT cpu hotplug
Date: Wed, 07 Jul 2010 13:07:21 +0300	[thread overview]
Message-ID: <4C3451D9.4080705@redhat.com> (raw)
In-Reply-To: <20100707045705.GA3427@morn.localdomain>

On 07/07/2010 07:57 AM, 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.
>
> 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.
>
> Thoughts?
>    

Very nice.  I thought about doing this but abandoned it as 
unmaintainable.  Using external functions and the ID variable, however, 
reduces the mess to tolerable proportions, and gains us a lot of 
flexibility.  We can now have any combinations of sockets and installed 
cpus.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2010-07-07 10:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07  4:57 Alt SeaBIOS SSDT cpu hotplug Kevin O'Connor
2010-07-07 10:07 ` Avi Kivity [this message]
2010-07-08 13:19   ` Liu, Jinsong
2010-07-09  5:35     ` Kevin O'Connor
2010-07-09 16:41       ` Liu, Jinsong
2010-07-11 16:10         ` Kevin O'Connor
2010-07-24 18:04         ` Kevin O'Connor
2010-07-25  4:49           ` Liu, Jinsong
2010-07-30 17:22           ` Liu, Jinsong
2010-07-31  0:04             ` Kevin O'Connor
2010-08-02  2:41               ` Liu, Jinsong
2010-08-02  5:49                 ` Kevin O'Connor
2010-08-02  8:12                   ` Alexander Graf
2010-08-02 15:55                     ` Kevin O'Connor
2010-08-02 16:10                       ` Alexander Graf
2010-08-02 16:13                       ` Avi Kivity
2010-08-02 16:15                         ` Alexander Graf
2010-08-02 17:27                         ` Kevin O'Connor
2010-08-03  0:30                           ` Zheng, Shaohui
2010-08-03  9:00                             ` Liu, Jinsong
2010-08-03 22:47                               ` Kevin O'Connor
2010-08-06  3:46                                 ` Liu, Jinsong
2010-07-07 10:22 ` Gleb Natapov
2010-07-07 23:26   ` Kevin O'Connor
2010-07-08 12:54     ` Gleb Natapov
2010-07-09  0:45       ` Kevin O'Connor
2010-07-09 15:44         ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C3451D9.4080705@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jinsong.liu@intel.com \
    --cc=kevin@koconnor.net \
    --cc=kvm@vger.kernel.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.