All of lore.kernel.org
 help / color / mirror / Atom feed
* cpu hotplug issue
@ 2011-07-19 17:40 Vasilis Liaskovitis
  2011-07-20  8:35 ` Gleb Natapov
  0 siblings, 1 reply; 42+ messages in thread
From: Vasilis Liaskovitis @ 2011-07-19 17:40 UTC (permalink / raw)
  To: kvm

Hello,

I have encountered a problem trying to hotplug a CPU in my x86_64 guest setup.

host os: x86_64 debian-squeeze (2.6.32-5-amd64 kernel)
qemu-kvm: 0.14.1 or latest, both with the following (not-accepted)
patch to allow hotplug on the main_system_bus applied:
http://lists.gnu.org/archive/html/qemu-devel/2010-08/msg00850.html
guest os: x86_64 debian-testing with 2.6.39-2-amd64 kernel or debian
stable-squeeze with 2.6.32-5-amd64.

example qemu-kvm command line (others have also been tried, this is
the simplest):
/opt/qemu-kvm/bin/qemu-system-x86_64 -enable-kvm -M pc -smp
1,maxcpus=2 -drive file=/opt/images/wheezy.qcow2 -monitor stdio

My first issue is regarding the acpi event delivery: I am running
"udevadm monitor" in my guest OS.
When I issue the cpu-hotplug on my qemu-monitor:

qemu_monitor: cpu_set 1 online

No udev-acpi event appears in the udevadm monitor of the guest.

if i issue a pci-device hotplug command afterwards e.g. adding a NIC:

qemu_monitor: pci_add auto nic

then the cpu-hotplug acpi/udev events appear in the udev monitor:

KERNEL[1311086666.114132] add
/devices/LNXSYSTM:00/device:00/LNXCPU:01 (acpi)
KERNEL[1311086666.119475] add      /devices/system/cpu/cpu1 (cpu)
KERNEL[1311086666.120699] add
/devices/virtual/thermal/cooling_device1 (thermal)
UDEV  [1311086666.158445] add      /devices/system/cpu/cpu1 (cpu)
UDEV  [1311086666.159925] add
/devices/virtual/thermal/cooling_device1 (thermal)
UDEV  [1311086666.174848] add
/devices/LNXSYSTM:00/device:00/LNXCPU:01 (acpi)

So only then is the./sys/devices/system/cpu/cpu1/ directory created.

Is the acpi event supposed to be delivered to the guest OS immediately
after the cpu_set command? Or is what I
described expected behaviour? I am probably missing something, as
issuing a pci_add device command seems
irrelevant for the purpose of a CPU-hotplug acpi event.

My second issue: after the successful creation of the cpu1 directory I
try to online the cpu:

echo 1 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: Input/output error

in the guest, dmesg reports:

[ 2325.376355] Booting Node 0 Processor 1 APIC 0x1
[ 2325.376357] smpboot cpu 1: start_ip = 9a000
[ 2330.821306] CPU1: Not responding.

and subsequent writes to /sys/devices/system/cpu/cpu1/online return
invalid argument.
Is there an obvious problem with the setup I have described?

The same problem was observed with other -smp,maxcpus options as well
e.g. -smp 2,macpus=4 and trying to online cpu3.
I have also tried to specify "-cpu phenom" in the qemu command line,
with no effect.

qemu-0.14.1 has seabios-0.6.1 or 0.6.2 I believe, both of which
include cpu hotplug support. I have also tried the newest
seabios (from repository) to be on the safe side with the same result,
so this doesn't seem to be a bios problem.

thanks for any help,

- Vasilis

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

end of thread, other threads:[~2011-08-04  8:40 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19 17:40 cpu hotplug issue Vasilis Liaskovitis
2011-07-20  8:35 ` Gleb Natapov
2011-07-21 11:06   ` [PATCH] " Vasilis Liaskovitis
2011-07-21 11:33     ` Gleb Natapov
2011-07-21 11:42       ` Jan Kiszka
2011-07-21 11:51         ` Gleb Natapov
2011-07-21 11:55           ` Jan Kiszka
2011-07-21 12:00             ` Gleb Natapov
2011-07-21 12:18             ` Avi Kivity
2011-07-21 12:22               ` Gleb Natapov
2011-07-21 12:39               ` Jan Kiszka
2011-07-21 13:27               ` Lucas Meneghel Rodrigues
2011-07-21 12:45           ` Gleb Natapov
2011-07-22 10:56             ` Jan Kiszka
2011-07-24 11:56               ` Gleb Natapov
2011-07-24 16:11                 ` Jan Kiszka
2011-07-25 13:18                   ` Jan Kiszka
2011-07-25 13:21                     ` Gleb Natapov
2011-07-25 13:26                       ` Jan Kiszka
2011-07-27 16:35                     ` Vasilis Liaskovitis
2011-07-28 16:52                       ` Jan Kiszka
2011-08-02  9:46                         ` Vasilis Liaskovitis
2011-08-02 10:24                           ` Jan Kiszka
2011-08-02 13:41                             ` Vasilis Liaskovitis
2011-08-03 10:07                               ` Vasilis Liaskovitis
2011-08-03 10:37                                 ` Jan Kiszka
2011-08-03 10:38                                   ` Gleb Natapov
2011-08-03 10:42                                     ` Jan Kiszka
2011-08-03 16:25                                       ` Vasilis Liaskovitis
2011-08-04  8:01                                         ` Gleb Natapov
2011-08-04  8:40                                           ` Jan Kiszka
2011-07-21 13:08       ` Vasilis Liaskovitis
2011-07-21 13:11         ` Gleb Natapov
2011-07-21 13:12           ` Vasilis Liaskovitis
2011-07-21 13:13             ` Gleb Natapov
2011-07-21 13:15         ` Avi Kivity
2011-07-21 13:15           ` Avi Kivity
2011-07-21 11:36     ` Jan Kiszka
2011-07-21 12:22     ` Jan Kiszka
2011-07-21 12:25       ` Gleb Natapov
2011-07-21 12:35         ` Jan Kiszka
2011-07-21 12:40           ` Gleb Natapov

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.