From: Eric Blake <eblake@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Drew Jones <drjones@redhat.com>,
qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com,
pbonzini@redhat.com, lcapitulino@redhat.com,
Karen Noel <knoel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] qga: introduce guest-get-vcpus / guest-set-vcpus with stubs
Date: Tue, 05 Mar 2013 16:12:44 -0700 [thread overview]
Message-ID: <51367BEC.2070502@redhat.com> (raw)
In-Reply-To: <51367A50.6040405@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2757 bytes --]
On 03/05/2013 04:05 PM, Laszlo Ersek wrote:
>> The interface seems relatively sane, though, and it looks like something
>> that libvirt would be able to use without having to add any new APIs
>> (just a new flag value to the existing virDomainSetVcpusFlags() function).
>
> Oh.
>
> virDomainSetVcpusFlags() [src/libvirt.c]
> qemuDomainSetVcpusFlags() [src/qemu/qemu_driver.c]
> qemuDomainHotplugVcpus()
> qemuMonitorSetCPU() [src/qemu/qemu_monitor.c]
> qemuMonitorTextSetCPU()
> "cpu_set %d %s"
>
> Does this work? I can't find any trace of the "cpu_set" (or the
> "set_cpu") monitor command in upstream qemu.
>
The old cpu_set HMP command "worked" in something like qemu 0.10, and
was ripped out when we realized it didn't actually work in a way that
was guaranteed to be safe to the guest. Since then, the libvirt command
has been a guaranteed failure on qemu, although it continues to work on
xen (and since it has been several YEARS now of not working, people are
laughing at qemu for not getting cpu hotplug working when xen has had it
for so long).
Basically, libvirt would add a new flag that requests using the guest
agent command instead of the monitor command (supposing that we ever do
get around to having a working monitor command that uses ACPI cpu hot
unplug).
> The relevant libvirt commits are:
> - e8d6c289 Support VCPU hotplug in QEMU guests
> ("NB, currently untested since QEMU segvs when running this!")
> - a980d123 Fix CPU hotplug command names
>
> If this works and I'm just not seeing something then I have no reason to
> pursue this series.
No, it doesn't work because the HMP command was (intentionally) removed
several years ago when it was determined to be broken.
>
> ... Ah I understand now. "cpu_set" *is* supported by the qemu-kvm
> project at <git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git> -- and
> by RHEL-6 qemu-kvm --, via ACPI.
Except that the ACPI approach didn't quite work, so qemu-kvm doesn't
expose that right now.
>
> I'll have to test this in RHEL-6. If it doesn't work, I should check
> why. If it does, I'll have to figure out if I should continue to work on
> this.
Yes, PLEASE continue to work on this - having the guest agent as an
alternative to ACPI has proven useful in other respects (for example, we
wired up virDomainShutdownFlags() to let the user choose between
guest-agent, ACPI, or hypervisor choice).
>
> I wonder why <git://git.qemu.org/qemu.git> doesn't have "cpu_set".
Because getting ACPI hotplug to work correctly has been harder than
anyone anticipated.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-03-05 23:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 22:19 [Qemu-devel] [PATCH 0/3] qga/Linux: online/offline/query VCPUs via guest sysfs Laszlo Ersek
2013-03-04 22:19 ` [Qemu-devel] [PATCH 1/3] qga: introduce guest-get-vcpus / guest-set-vcpus with stubs Laszlo Ersek
2013-03-05 21:08 ` Eric Blake
2013-03-05 23:05 ` Laszlo Ersek
2013-03-05 23:12 ` Eric Blake [this message]
2013-03-05 23:32 ` Laszlo Ersek
2013-03-06 7:40 ` Andrew Jones
2013-03-06 13:49 ` Eric Blake
2013-03-06 16:37 ` Laszlo Ersek
2013-03-04 22:19 ` [Qemu-devel] [PATCH 2/3] qga: implement qmp_guest_get_vcpus() for Linux with sysfs Laszlo Ersek
2013-03-05 20:03 ` mdroth
2013-03-05 20:22 ` Eric Blake
2013-03-05 20:45 ` mdroth
2013-03-05 21:05 ` Laszlo Ersek
2013-03-05 20:25 ` Eric Blake
2013-03-05 21:34 ` Laszlo Ersek
2013-03-05 22:06 ` mdroth
2013-03-04 22:19 ` [Qemu-devel] [PATCH 3/3] qga: implement qmp_guest_set_vcpus() " Laszlo Ersek
2013-03-05 20:09 ` mdroth
2013-03-05 21:09 ` Laszlo Ersek
2013-03-05 21:19 ` Eric Blake
2013-03-05 23:23 ` Laszlo Ersek
2013-03-05 23:37 ` Eric Blake
2013-03-06 0:44 ` Laszlo Ersek
2013-03-06 9:57 ` Paolo Bonzini
2013-03-06 13:46 ` Eric Blake
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=51367BEC.2070502@redhat.com \
--to=eblake@redhat.com \
--cc=drjones@redhat.com \
--cc=knoel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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.