From: Thomas Renninger <trenn@suse.de>
To: Gleb Natapov <gleb@redhat.com>
Cc: linux-acpi@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: how CPU hot-plug is suppose to work on Linux?
Date: Fri, 8 Oct 2010 14:28:18 +0200 [thread overview]
Message-ID: <201010081428.18846.trenn@suse.de> (raw)
In-Reply-To: <20100921134109.GC11145@redhat.com>
On Tuesday 21 September 2010 15:41:09 Gleb Natapov wrote:
> Hello,
>
> We are trying to add CPU hot-plug/unplug capability to KVM. We want to
> be able to initiate hot-plug/unplug from a host. Our current schema
> works like this:
>
> We have Processor object in DSDT for each potentially available CPU.
> Each Processor object has _MAD, _STA, _EJ0. _MAD of present CPU
> returns enabled LAPIC structure. _STA of present CPU return 0xf. _MADT
> of non present CPU returns disabled LAPIC. _STA returns 0x0. _EJ0 does
> nothing.
>
> When CPU is hot plugged:
>
> 1. Bit is set in sts register of gpe
> 2. acpi interrupt is sent
> 3. Linux ACPI evaluates corespondent gpe's _L() method
> 4. _L() method determines which CPU's status is changed
> 5. For each CPU that changed status from not present to present
> call Notify(1) to corespondent Processor() object.
>
> When CPU is hot unplugged:
>
> 1. Bit is set in sts register of gpe
> 2. acpi interrupt is sent
> 3. Linux ACPI evaluates corespondent gpe's _L() method
> 4. _L() method determines which CPU's status is changed
> 5. For each CPU that changed status from present to non present
> call Notify(3)
That does not work.
> to corespondent Processor() object.
>
> Now, CPU hot plug appears to be working. But CPU hot unplug does
> nothing. I expect that Linux will offline CPU and eject it after
> evaluating Notify(3) and seeing that _STA of ejected CPU returns
> 0x0 now.
>
> Any ideas how it is suppose to work?
Put a container device, e.g. ACPI0004 above the CPU objects.
and call notify (on remove and add) on it instead of the CPU
object itself with e.g.:
#define ACPI_NOTIFY_BUS_CHECK (u8) 0x00
#define ACPI_NOTIFY_DEVICE_CHECK (u8) 0x01
acpi core should go through the devices and call add()/probe()
on devices which appear and remove() on devices which _STA
method does not return active anymore.
Thomas
prev parent reply other threads:[~2010-10-08 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 13:41 how CPU hot-plug is suppose to work on Linux? Gleb Natapov
2010-10-08 12:28 ` Thomas Renninger [this message]
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=201010081428.18846.trenn@suse.de \
--to=trenn@suse.de \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-acpi@vger.kernel.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.