[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command |
Date: |
Tue, 17 Apr 2018 16:18:43 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/12/2018 07:50 AM, Simon Ruderich wrote:
> Adapted patch from Baojun Wang [1] with the following commit message:
>
> I found this could be useful to have qemu-softmmu as a cross
> debugger (launch with -s -S command line option), then if we can
> have a command to load guest physical memory, we can use cross gdb
> to do some target debug which gdb cannot do directly.
>
> pmemload is necessary to directly write physical memory which is not
> possible with gdb alone as it uses only logical addresses.
>
> The QAPI for pmemload uses "val" as parameter name for the physical
> address. This name is not very descriptive but is consistent with the
> existing pmemsave. Changing the parameter name of pmemsave is not
> possible without breaking the existing API.
>
> [1]: https://lists.gnu.org/archive/html/qemu-trivial/2014-04/msg00074.html
>
> Based-on-patch-by: Baojun Wang <address@hidden>
> Signed-off-by: Simon Ruderich <address@hidden>
> ---
Focusing on just the interface:
> +++ b/qapi/misc.json
> @@ -1185,6 +1185,26 @@
> { 'command': 'pmemsave',
> 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
>
> +##
> +# @pmemload:
> +#
> +# Load a portion of guest physical memory from a file.
> +#
> +# @val: the physical address of the guest to start from
> +#
> +# @size: the size of memory region to load
Should size be an optional parameter (default read to the end of the file)?
> +#
> +# @offset: the offset in the file to start from
Should offset be an optional parameter (default start reading from
offset 0 of the file)?
> +#
> +# @filename: the file to load the memory from as binary data
> +#
> +# Returns: Nothing on success
> +#
> +# Since: 2.13
> +##
> +{ 'command': 'pmemload',
> + 'data': {'val': 'int', 'size': 'int', 'offset': 'int', 'filename': 'str'} }
> +
> ##
> # @cont:
> #
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH] qmp: add pmemload command, (continued)
- Re: [Qemu-devel] [PATCH] qmp: add pmemload command, Eric Blake, 2018/04/11
- Re: [Qemu-devel] [PATCH] qmp: add pmemload command, Simon Ruderich, 2018/04/12
- [Qemu-devel] [PATCH v2 1/5] cpus: correct coding style in qmp_memsave/qmp_pmemsave, Simon Ruderich, 2018/04/12
- [Qemu-devel] [PATCH v2 2/5] cpus: convert qmp_memsave/qmp_pmemsave to use qemu_open, Simon Ruderich, 2018/04/12
- Re: [Qemu-devel] [PATCH v2 2/5] cpus: convert qmp_memsave/qmp_pmemsave to use qemu_open, Eric Blake, 2018/04/17
- [Qemu-devel] [PATCH v2 4/5] hmp: don't truncate size in hmp_memsave/hmp_pmemsave, Simon Ruderich, 2018/04/12
- Re: [Qemu-devel] [PATCH v2 4/5] hmp: don't truncate size in hmp_memsave/hmp_pmemsave, Eric Blake, 2018/04/17
- [Qemu-devel] [PATCH v2 3/5] cpus: use size_t in qmp_memsave/qmp_pmemsave, Simon Ruderich, 2018/04/12
- Re: [Qemu-devel] [PATCH v2 3/5] cpus: use size_t in qmp_memsave/qmp_pmemsave, Eric Blake, 2018/04/17
- [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command, Simon Ruderich, 2018/04/12
- Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command,
Eric Blake <=
- Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command, Simon Ruderich, 2018/04/22
- Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command, Eric Blake, 2018/04/23
- Re: [Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command, Simon Ruderich, 2018/04/24
- Re: [Qemu-devel] [PATCH v2 1/5] cpus: correct coding style in qmp_memsave/qmp_pmemsave, Eric Blake, 2018/04/17
- Re: [Qemu-devel] [PATCH v2 1/5] cpus: correct coding style in qmp_memsave/qmp_pmemsave, Simon Ruderich, 2018/04/22