On 07/20/2015 07:49 AM, Cornelia Huck wrote:
> From: "Jason J. Herne" <jjhe...@linux.vnet.ibm.com>
> 
> 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 support
> within Qemu and for guest operating system developers.
> 
> Reviewed-by: Thomas Huth <th...@linux.vnet.ibm.com>
> Reviewed-by: David Hildenbrand <d...@linux.vnet.ibm.com>
> Signed-off-by: Jason J. Herne <jjhe...@linux.vnet.ibm.com>
> Signed-off-by: Cornelia Huck <cornelia.h...@de.ibm.com>
> ---

> +void qmp_dump_skeys(const char *filename, Error **errp)
> +{

> +
> +    f = fopen(filename, "wb");

If you'll use qemu_fopen() here...


> +++ b/qapi-schema.json
> @@ -2058,6 +2058,19 @@
>    'returns': 'DumpGuestMemoryCapability' }
>  
>  ##
> +# @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).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to