All of lore.kernel.org
 help / color / mirror / Atom feed
* QEMU online/offline cpu
@ 2017-01-02 20:27 ` Ozgur O Kilic
  0 siblings, 0 replies; 4+ messages in thread
From: Ozgur O Kilic @ 2017-01-02 20:27 UTC (permalink / raw)
  To: kvm, qemu-devel

Hi

I am trying to understand how QEMU threads respond to set a vCPU online or offline. 

Specifically, what happens to QEMU thread if in the guest, we execute:

echo 0 > /sys/devices/system/cpu/cpu1/online

Is the corresponding QEMU thread paused?

Thank you
Ozgur Ozan Kilic

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

* [Qemu-devel] QEMU online/offline cpu
@ 2017-01-02 20:27 ` Ozgur O Kilic
  0 siblings, 0 replies; 4+ messages in thread
From: Ozgur O Kilic @ 2017-01-02 20:27 UTC (permalink / raw)
  To: kvm, qemu-devel

Hi

I am trying to understand how QEMU threads respond to set a vCPU online or offline. 

Specifically, what happens to QEMU thread if in the guest, we execute:

echo 0 > /sys/devices/system/cpu/cpu1/online

Is the corresponding QEMU thread paused?

Thank you
Ozgur Ozan Kilic

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

* Re: [Qemu-devel] QEMU online/offline cpu
  2017-01-02 20:27 ` [Qemu-devel] " Ozgur O Kilic
  (?)
@ 2017-01-03 11:37 ` Igor Mammedov
  2017-01-09 17:10   ` Igor Mammedov
  -1 siblings, 1 reply; 4+ messages in thread
From: Igor Mammedov @ 2017-01-03 11:37 UTC (permalink / raw)
  To: Ozgur O Kilic; +Cc: kvm, qemu-devel, Peter Krempa

On Mon, 2 Jan 2017 23:27:50 +0300
Ozgur O Kilic <okilic1@binghamton.edu> wrote:

> Hi
> 
> I am trying to understand how QEMU threads respond to set a vCPU online or offline. 
> 
> Specifically, what happens to QEMU thread if in the guest, we execute:
> 
> echo 0 > /sys/devices/system/cpu/cpu1/online
> Is the corresponding QEMU thread paused?
on success CPU executes play_dead() and isn't used/scheduled by guest.

However it's still possible to online it back using
echo 1 > /sys/devices/system/cpu/cpu1/online

If you need to prevent that happening you should use QEMU's
device_del command via HMP/QMP interface.
For x86 it would trigger ACPI based CPU hot-unplug action after which
vCPU object in QMEU would be destroyed and corresponding KVM thread
be parked and corresponding CPU object /sys/devices/system/cpu/cpuXX
in guest is removed. To use that CPU again in guest, one should
hotplug it back in QEMU using device_add.

details of ACPI based cpu hot(un)plug qemu<->guest protocol are described in
QEMU/docs/specs/acpi_cpu_hotplug.txt file. x86 ACPI based implementation is
mostly contained in QEMU/hw/acpi/cpu* files.

Wiki page http://wiki.qemu.org/Features/CPUHotplug is rather outdated,
I'll update it to reflect currently implemented hotplug interfaces/targets.

PS:
cpu hot-unplug is recently new feature so one should use recent
qemu/libvirt versions.

> Thank you
> Ozgur Ozan Kilic


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

* Re: [Qemu-devel] QEMU online/offline cpu
  2017-01-03 11:37 ` Igor Mammedov
@ 2017-01-09 17:10   ` Igor Mammedov
  0 siblings, 0 replies; 4+ messages in thread
From: Igor Mammedov @ 2017-01-09 17:10 UTC (permalink / raw)
  To: Ozgur O Kilic; +Cc: Peter Krempa, qemu-devel, kvm, David Gibson

On Tue, 3 Jan 2017 12:37:36 +0100
Igor Mammedov <imammedo@redhat.com> wrote:

[...]
> Wiki page http://wiki.qemu.org/Features/CPUHotplug is rather outdated,
> I'll update it to reflect currently implemented hotplug interfaces/targets.

David,

I've updated above CPUHotplug wiki page to match current state of QEMU.
Could you take a look at it and maybe update from SPAPR perspective.

PS:
Feel free to fix whatever if you find a better wording/mistake.


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

end of thread, other threads:[~2017-01-09 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 20:27 QEMU online/offline cpu Ozgur O Kilic
2017-01-02 20:27 ` [Qemu-devel] " Ozgur O Kilic
2017-01-03 11:37 ` Igor Mammedov
2017-01-09 17:10   ` Igor Mammedov

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.