From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHC7k-00008P-CD for qemu-devel@nongnu.org; Mon, 20 Jul 2015 10:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHC7g-0002AG-OG for qemu-devel@nongnu.org; Mon, 20 Jul 2015 10:32:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHC7g-0002A9-Jo for qemu-devel@nongnu.org; Mon, 20 Jul 2015 10:32:52 -0400 References: <1437400198-25382-1-git-send-email-cornelia.huck@de.ibm.com> <1437400198-25382-5-git-send-email-cornelia.huck@de.ibm.com> From: Eric Blake Message-ID: <55AD0692.9050507@redhat.com> Date: Mon, 20 Jul 2015 08:32:50 -0600 MIME-Version: 1.0 In-Reply-To: <1437400198-25382-5-git-send-email-cornelia.huck@de.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pQFlB7oMOo32JkQNvIhloC1Tt8IRd2XD5" Subject: Re: [Qemu-devel] [PATCH for-2.5 4/8] s390x: Dump storage keys qmp command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de, jjherne@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pQFlB7oMOo32JkQNvIhloC1Tt8IRd2XD5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/20/2015 07:49 AM, Cornelia Huck wrote: > From: "Jason J. Herne" >=20 > Provide a dump-skeys qmp command to allow the end user to dump storage > keys. This is useful for debugging problems with guest storage key supp= ort > within Qemu and for guest operating system developers. >=20 > Reviewed-by: Thomas Huth > Reviewed-by: David Hildenbrand > Signed-off-by: Jason J. Herne > Signed-off-by: Cornelia Huck > --- > +void qmp_dump_skeys(const char *filename, Error **errp) > +{ > + > + f =3D fopen(filename, "wb"); If you'll use qemu_fopen() here... > +++ b/qapi-schema.json > @@ -2058,6 +2058,19 @@ > 'returns': 'DumpGuestMemoryCapability' } > =20 > ## > +# @dump-skeys > +# > +# Dump guest's storage keys. @filename: the path to the file to dump = to. > +# This command is only supported on s390 architecture. > +# > +# Returns: nothing on success > +# > +# Since: 2.5 > +## > +{ 'command': 'dump-skeys', > + 'data': { 'filename': 'str' } } then this command will automatically accept /dev/fdset/NNN notation for allowing the user to pass in a file descriptor with add-fd then tying that fd to this command (useful for when qemu is restricted from directly calling open() for security reasons). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pQFlB7oMOo32JkQNvIhloC1Tt8IRd2XD5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVrQaSAAoJEKeha0olJ0NqLzEH/1oljigRlG6KIpAU5AMe/LuO IqlNZOUjxGGGLLQk73zP0DjbkuM8SytqMkk5m/uFBXDeJW1EL3nxlqyN0X7YXYd0 vRbpZ8lCH5b3bobV99gLTmkvY+ehJ7S6i3wWiYj1FnEOs2o8oSqVkaDE3zzRBXIR 4MQpk5hI+5JpsGeKfZnQfI8RODZ+/H++jz8ffqDDC6szh6oG6NrpaRgYCe1c3979 U/yAg0YA36CqidV1qYjeJH+X+mqaW2hjIBt6q1ejeF43yhlM3ggLl9I4Bsbvq11C b7+XhjXMIReHFG7CO+SOhFABCI+XpvyaY6bfBWoDsOho+JixSfGbrj3vhKcEOFE= =gix6 -----END PGP SIGNATURE----- --pQFlB7oMOo32JkQNvIhloC1Tt8IRd2XD5--