Patchwork [1/3] qmp: dump-guest-memory: improve schema doc (again)

login
register
mail settings
Submitter Luiz Capitulino
Date Sept. 21, 2012, 5:07 p.m.
Message ID <1348247243-12446-2-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/185844/
State New
Headers show

Comments

Luiz Capitulino - Sept. 21, 2012, 5:07 p.m.
o Add a note about memory allocation with paging=true
 o Fix indentation

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qapi-schema.json | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)
Eric Blake - Sept. 21, 2012, 6:11 p.m.
On 09/21/2012 11:07 AM, Luiz Capitulino wrote:
>  o Add a note about memory allocation with paging=true
>  o Fix indentation
> 
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>  qapi-schema.json | 32 ++++++++++++++++++++------------
>  1 file changed, 20 insertions(+), 12 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 14e4419..3d93ebe 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -1982,26 +1982,33 @@
>  # supported on i386 and x86_64.
>  #
>  # @paging: if true, do paging to get guest's memory mapping. This allows
> -# using gdb to process the core file. However, setting @paging to false
> -# may be desirable because of two reasons:
> +# 	   using gdb to process the core file.

You've got a TAB in there, that made it hard to see what the intended
indentation really is.  The rest of the file doesn't have TABs, so you
need to respin this.

> +# 	   IMPORTANT: this option can make QEMU allocates several gigabytes

s/allocates/allocate/

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index 14e4419..3d93ebe 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1982,26 +1982,33 @@ 
 # supported on i386 and x86_64.
 #
 # @paging: if true, do paging to get guest's memory mapping. This allows
-# using gdb to process the core file. However, setting @paging to false
-# may be desirable because of two reasons:
+# 	   using gdb to process the core file.
 #
-#   1. The guest may be in a catastrophic state or can have corrupted
-#      memory, which cannot be trusted
-#   2. The guest can be in real-mode even if paging is enabled. For example,
-#      the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
+# 	   IMPORTANT: this option can make QEMU allocates several gigabytes
+# 	   	      of RAM. This can happen for a large guest, or a
+# 	   	      malicious guest pretending to be large.
+#
+#	   Also, paging=true has the following limitations:
+#
+#          1. The guest may be in a catastrophic state or can have corrupted
+#             memory, which cannot be trusted
+#          2. The guest can be in real-mode even if paging is enabled. For
+#             example, the guest uses ACPI to sleep, and ACPI sleep state
+#             goes in real-mode
 #
 # @protocol: the filename or file descriptor of the vmcore. The supported
-# protocols are:
+# 	     protocols are:
 #
-#   1. file: the protocol starts with "file:", and the following string is
-#      the file's path.
-#   2. fd: the protocol starts with "fd:", and the following string is the
-#      fd's name.
+#            1. file: the protocol starts with "file:", and the following
+#            	string is the file's path.
+#            2. fd: the protocol starts with "fd:", and the following string
+#            	is the fd's name.
 #
 # @begin: #optional if specified, the starting physical address.
 #
 # @length: #optional if specified, the memory size, in bytes. If you don't
-# want to dump all guest's memory, please specify the start @begin and @length
+# 	   want to dump all guest's memory, please specify the start @begin
+# 	   and @length
 #
 # Returns: nothing on success
 #
@@ -2010,6 +2017,7 @@ 
 { 'command': 'dump-guest-memory',
   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
             '*length': 'int' } }
+
 ##
 # @netdev_add:
 #