From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV5pN-0003Lh-8W for qemu-devel@nongnu.org; Wed, 24 Apr 2013 15:58:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UV5pI-0003l6-7n for qemu-devel@nongnu.org; Wed, 24 Apr 2013 15:58:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV5pH-0003kn-Vs for qemu-devel@nongnu.org; Wed, 24 Apr 2013 15:58:00 -0400 Message-ID: <5178392C.3070703@redhat.com> Date: Wed, 24 Apr 2013 13:57:32 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366731014-48790-1-git-send-email-jfrei@linux.vnet.ibm.com> <1366731014-48790-2-git-send-email-jfrei@linux.vnet.ibm.com> <5176ABB7.8080102@redhat.com> <5178116D.2070900@linux.vnet.ibm.com> In-Reply-To: <5178116D.2070900@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2VNDRIWXRAQDSVXNWANUL" Subject: Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ekaterina Tumanova Cc: Peter Maydell , qemu-devel , Alexander Graf , Rabin Vincent , Christian Borntraeger , Jens Freimann , Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VNDRIWXRAQDSVXNWANUL Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/24/2013 11:07 AM, Ekaterina Tumanova wrote: >> This raises an interesting question about introspection - how will >> management apps (such as libvirt) be able to determine whether the >> paging command is supported for a given architecture? Do we need to >> expand the 'MachineInfo' QMP datatype so that 'query-machines' can tel= l >> us whether a given machine will support or reject attempts to set >> 'paging':true during 'dump-guest-memory'? >> > as far as I understand libvirt doesn't actually use -p dump-guest-memor= y > parameter. > and virsh dump doesn't have paging param Hmm, you're right. At the public libvirt API level, virDomainCoreDumpFlags currently exposes VIR_DUMP_MEMORY_ONLY (request to use dump-guest-memory instead of migration to file), but does not have a flag for exposing the paging boolean. At the internal C level, qemuMonitorJSONDump hardcodes 'paging' to false in current libvirt.git. I did a bit more digging, and found this libvirt commit: commit d239085e956ca6ca42480e877e98a4302e91b853 Author: Eric Blake Date: Mon Sep 17 13:05:29 2012 -0600 qemu: drop unused arguments for dump-guest-memory Upstream qemu has raised a concern about whether dumping guest memory by reading guest paging tables is a security hole: https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02607.html While auditing libvirt to see if we would be impacted, I noticed that we had some dead code. It is simpler to nuke the dead code and limit our monitor code to just the subset we make use of. * src/qemu/qemu_monitor.h (QEMU_MONITOR_DUMP): Drop poorly named and mostly-unused enum. * src/qemu/qemu_monitor.c (qemuMonitorDumpToFd): Drop arguments. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDump): Likewise. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDump): Likewise. * src/qemu/qemu_driver.c (qemuDumpToFd): Update caller. [Is it a bad sign when I can remember that libvirt USED to partially support the paging flag, but not that _I_ was the one that ripped it out because the public API never supported it?] --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2VNDRIWXRAQDSVXNWANUL 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/ iQEcBAEBCAAGBQJReDktAAoJEKeha0olJ0NqSzEIAJa6Vi9nzTyWwqbewOzvHo0W olZs8YMpJdxlwrp0i4WfT0qS4O+ENtjqufwCWwwzPG+P9K2ohXxQRIV9HGUeb6KC 6YeQUOnUT6b1e+HIaL8Bykq8/VWmI4TJo6kswkDQRlqpD7e20s9lQ+gLwSgwVt/Q 54dZuR7DdIoBbBV+ch9/Lx6trOKMH2KFmo9eecgUbdOPHCaVvjrHrNMcPh2ypUrN r/Y3gXlHHp4aX1lHGXIlAwTU+LN+gjTMBYG0UWCXkRCSPqPHo3jz6aI+DSugwb5N XzcaYhKxHhx/ZqvqDzU551seabDSRbYxTKNZ3pR0ttBCZ7Bxv5LrF7j7mqnB1ks= =8tWD -----END PGP SIGNATURE----- ------enig2VNDRIWXRAQDSVXNWANUL--