diff --git a/doc/user-guides/acrn-shell.rst b/doc/user-guides/acrn-shell.rst index 7437e0527..45857a4de 100644 --- a/doc/user-guides/acrn-shell.rst +++ b/doc/user-guides/acrn-shell.rst @@ -21,9 +21,12 @@ The ACRN hypervisor shell supports the following commands: - List all vCPUs in all VMs * - vcpu_dumpreg - Dump registers for a specific vCPU - * - dumpmem - - Dump host memory, starting at a given address, and for a given length - (in bytes) + * - dump_host_mem + - Dump the host memory region as specified by the start of the region ``hva`` (in hexadecimal) + and its length ``length`` (in bytes, decimal number). + * - dump_guest_mem + - Dump a User VM (guest) memory region based on the VM ID (``vm_id``, in decimal), + the start of the memory region ``gva`` (in hexadecimal) and its length ``length`` (in bytes, decimal number). * - vm_console - Switch to the VM's console. Use :kbd:`Ctrl+Spacebar` to return to the ACRN shell console @@ -104,10 +107,10 @@ function ``acpi_idle_do_entry``. system map information -dumpmem -======= +dump_host_mem +============= -``dumpmem mem_address`` provides the specified memory target data such as +``dump_host_mem hva length`` provides the specified memory target data such as the physical CPU (pCPU) number, etc. In this example, we know the pCPU active bitmap and physical CPU number @@ -129,6 +132,26 @@ pCPU number is 0x0000000000000004. acrn map information +dump_guest_mem +============== + +The ``dump_guest_mem`` command can dump guest memory according to the given +VM ID and guest virtual address (``gva``). + +In this example, we know the starting address of kernel text segment +in guest console or through the ``system.map`` (Note that the path for +``system.map`` depends on how we build the kernel) + +.. figure:: images/shell_image19.png + :align: center + + guest virtual address + +.. figure:: images/shell_image20.png + :align: center + + guest memory information + vm_console =========== diff --git a/doc/user-guides/images/shell_image19.png b/doc/user-guides/images/shell_image19.png new file mode 100644 index 000000000..6120127b8 Binary files /dev/null and b/doc/user-guides/images/shell_image19.png differ diff --git a/doc/user-guides/images/shell_image20.png b/doc/user-guides/images/shell_image20.png new file mode 100644 index 000000000..537b02025 Binary files /dev/null and b/doc/user-guides/images/shell_image20.png differ