public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Vasilis Liaskovitis <vliaskov@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: cpu hotplug issue
Date: Wed, 20 Jul 2011 11:35:07 +0300	[thread overview]
Message-ID: <20110720083507.GS2400@redhat.com> (raw)
In-Reply-To: <CA+1DO-y1shVfX4TMf1amtdHxg7o+M+2Ji=nwE=z759H9pNeUjA@mail.gmail.com>

On Tue, Jul 19, 2011 at 07:40:55PM +0200, Vasilis Liaskovitis wrote:
> Hello,
> 
> I have encountered a problem trying to hotplug a CPU in my x86_64 guest setup.
> 
You do everything right. It's qemu who is buggy. Since qemu need a patch
for cpu hotplug to not crash it nobody tests it, so code bit rots.

> 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
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
			Gleb.

  reply	other threads:[~2011-07-20  8:35 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 17:40 cpu hotplug issue Vasilis Liaskovitis
2011-07-20  8:35 ` Gleb Natapov [this message]
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

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=20110720083507.GS2400@redhat.com \
    --to=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=vliaskov@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox