public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* how CPU hot-plug is suppose to work on Linux?
@ 2010-09-21 13:41 Gleb Natapov
  2010-10-08 12:28 ` Thomas Renninger
  0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2010-09-21 13:41 UTC (permalink / raw)
  To: linux-acpi; +Cc: kvm

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) 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?

--
			Gleb.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-08 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox