Skip to content

Commit acb5aff

Browse files
mingqiangchideb-intel
authored andcommitted
doc:update acrn-shell.rst
update this doc related with dump host & guest memory. Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
1 parent 413f098 commit acb5aff

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

doc/user-guides/acrn-shell.rst

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ The ACRN hypervisor shell supports the following commands:
2121
- List all vCPUs in all VMs
2222
* - vcpu_dumpreg <vm_id> <vcpu_id>
2323
- Dump registers for a specific vCPU
24-
* - dumpmem <hva> <length>
25-
- Dump host memory, starting at a given address, and for a given length
26-
(in bytes)
24+
* - dump_host_mem <hva> <length>
25+
- Dump the host memory region as specified by the start of the region ``hva`` (in hexadecimal)
26+
and its length ``length`` (in bytes, decimal number).
27+
* - dump_guest_mem <vm_id> <gva> <length>
28+
- Dump a User VM (guest) memory region based on the VM ID (``vm_id``, in decimal),
29+
the start of the memory region ``gva`` (in hexadecimal) and its length ``length`` (in bytes, decimal number).
2730
* - vm_console <vm_id>
2831
- Switch to the VM's console. Use :kbd:`Ctrl+Spacebar` to return to the ACRN
2932
shell console
@@ -104,10 +107,10 @@ function ``acpi_idle_do_entry``.
104107

105108
system map information
106109

107-
dumpmem
108-
=======
110+
dump_host_mem
111+
=============
109112

110-
``dumpmem mem_address`` provides the specified memory target data such as
113+
``dump_host_mem hva length`` provides the specified memory target data such as
111114
the physical CPU (pCPU) number, etc.
112115

113116
In this example, we know the pCPU active bitmap and physical CPU number
@@ -129,6 +132,26 @@ pCPU number is 0x0000000000000004.
129132

130133
acrn map information
131134

135+
dump_guest_mem
136+
==============
137+
138+
The ``dump_guest_mem`` command can dump guest memory according to the given
139+
VM ID and guest virtual address (``gva``).
140+
141+
In this example, we know the starting address of kernel text segment
142+
in guest console or through the ``system.map`` (Note that the path for
143+
``system.map`` depends on how we build the kernel)
144+
145+
.. figure:: images/shell_image19.png
146+
:align: center
147+
148+
guest virtual address
149+
150+
.. figure:: images/shell_image20.png
151+
:align: center
152+
153+
guest memory information
154+
132155
vm_console
133156
===========
134157

3.72 KB
Loading
24.7 KB
Loading

0 commit comments

Comments
 (0)