From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD12Y-0007Wo-1w for qemu-devel@nongnu.org; Tue, 05 Mar 2013 18:13:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UD12P-0007n3-FO for qemu-devel@nongnu.org; Tue, 05 Mar 2013 18:12:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD12P-0007mt-49 for qemu-devel@nongnu.org; Tue, 05 Mar 2013 18:12:49 -0500 Message-ID: <51367BEC.2070502@redhat.com> Date: Tue, 05 Mar 2013 16:12:44 -0700 From: Eric Blake MIME-Version: 1.0 References: <1362435597-20018-1-git-send-email-lersek@redhat.com> <1362435597-20018-2-git-send-email-lersek@redhat.com> <51365EC2.8050903@redhat.com> <51367A50.6040405@redhat.com> In-Reply-To: <51367A50.6040405@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2BGXSCFVVLCDSSHWOVAFI" Subject: Re: [Qemu-devel] [PATCH 1/3] qga: introduce guest-get-vcpus / guest-set-vcpus with stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: Drew Jones , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, lcapitulino@redhat.com, Karen Noel This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2BGXSCFVVLCDSSHWOVAFI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/05/2013 04:05 PM, Laszlo Ersek wrote: >> The interface seems relatively sane, though, and it looks like somethi= ng >> that libvirt would be able to use without having to add any new APIs >> (just a new flag value to the existing virDomainSetVcpusFlags() functi= on). >=20 > Oh. >=20 > virDomainSetVcpusFlags() [src/libvirt.c] > qemuDomainSetVcpusFlags() [src/qemu/qemu_driver.c] > qemuDomainHotplugVcpus() > qemuMonitorSetCPU() [src/qemu/qemu_monitor.c] > qemuMonitorTextSetCPU() > "cpu_set %d %s" >=20 > Does this work? I can't find any trace of the "cpu_set" (or the > "set_cpu") monitor command in upstream qemu. >=20 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 >=20 > If this works and I'm just not seeing something then I have no reason t= o > 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. >=20 > ... Ah I understand now. "cpu_set" *is* supported by the qemu-kvm > project at -- 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. >=20 > 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 o= n > 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). >=20 > I wonder why doesn't have "cpu_set". Because getting ACPI hotplug to work correctly has been harder than anyone anticipated. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2BGXSCFVVLCDSSHWOVAFI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRNnvsAAoJEKeha0olJ0NqcpsH/0JQcATXyezF5k4i+2HjKhkq ATxn/8VVhaF82C/Kp0Q7YYsZExYi2CPVntEOacQlAkuqNpPURvQhgbYiDmyyC56s U8JLwAHkXzdcexoVu7yyhUL9sOejRmyoiLO7CzMMO8Uqe0DtDvXmxAFjE2z2MXCA /16IKqafNmS/WvX8uaWzk5SYCbyo/YqjOnLzgLsE7dCFZW1aovIS8GljEAb9nQX8 8jKrb9eLSQbbIgMg2F8dTLXxtxqxRZ5RkS0zAKK5drwinj6nbBcZt2goPE1BMIBW 1fVVKSBatr35P03A15ARtLS6+k6wRCOGCf6X4OR8pK+oNgGYxGMnl0sHI3bBxuc= =UrBD -----END PGP SIGNATURE----- ------enig2BGXSCFVVLCDSSHWOVAFI--