mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-04 13:19:47 +00:00
doc: Style cleanup in guides
- Minor style changes per Acrolinx recommendations and for consistency Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
This commit is contained in:
parent
72a9b7bae3
commit
0d280ced2f
@ -4,8 +4,8 @@ Device Model APIs
|
|||||||
#################
|
#################
|
||||||
|
|
||||||
This section contains APIs for the Service VM Device Model services. Sources
|
This section contains APIs for the Service VM Device Model services. Sources
|
||||||
for the Device Model are found in the devicemodel folder of the `ACRN
|
for the Device Model are found in the ``devicemodel`` folder of the `ACRN
|
||||||
hypervisor GitHub repo`_
|
hypervisor GitHub repo`_.
|
||||||
|
|
||||||
.. _ACRN hypervisor GitHub repo:
|
.. _ACRN hypervisor GitHub repo:
|
||||||
https://github.com/projectacrn/acrn-hypervisor
|
https://github.com/projectacrn/acrn-hypervisor
|
||||||
|
@ -4,7 +4,7 @@ Hypercall APIs
|
|||||||
##############
|
##############
|
||||||
|
|
||||||
This section contains APIs for the hypercall services. Sources
|
This section contains APIs for the hypercall services. Sources
|
||||||
for the Device Model are found in the `ACRN Hypervisor GitHub repo`_
|
for the Device Model are found in the `ACRN Hypervisor GitHub repo`_.
|
||||||
|
|
||||||
.. _ACRN Hypervisor GitHub repo:
|
.. _ACRN Hypervisor GitHub repo:
|
||||||
https://github.com/projectacrn/acrn-hypervisor/
|
https://github.com/projectacrn/acrn-hypervisor/
|
||||||
|
@ -12,47 +12,47 @@ The ACRN hypervisor shell supports the following commands:
|
|||||||
* - Command (and parameters)
|
* - Command (and parameters)
|
||||||
- Description
|
- Description
|
||||||
* - help
|
* - help
|
||||||
- Display information about supported hypervisor shell commands
|
- Display information about supported hypervisor shell commands.
|
||||||
* - version
|
* - version
|
||||||
- Display the HV version information
|
- Display the hypervisor version information.
|
||||||
* - vm_list
|
* - vm_list
|
||||||
- List all VMs, displaying the VM UUID, ID, name, and state ("Started"=running)
|
- List all VMs, displaying the VM UUID, ID, name, and state ("Started"=running).
|
||||||
* - vcpu_list
|
* - vcpu_list
|
||||||
- List all vCPUs in all VMs
|
- List all vCPUs in all VMs.
|
||||||
* - vcpu_dumpreg <vm_id> <vcpu_id>
|
* - vcpu_dumpreg <vm_id> <vcpu_id>
|
||||||
- Dump registers for a specific vCPU
|
- Dump registers for a specific vCPU.
|
||||||
* - dump_host_mem <hva> <length>
|
* - dump_host_mem <hva> <length>
|
||||||
- Dump the host memory region as specified by the start of the region ``hva`` (in hexadecimal)
|
- Dump the host memory region as specified by the start of the region ``hva`` (in hexadecimal)
|
||||||
and its length ``length`` (in bytes, decimal number).
|
and its length ``length`` (in bytes, decimal number).
|
||||||
* - dump_guest_mem <vm_id> <gva> <length>
|
* - dump_guest_mem <vm_id> <gva> <length>
|
||||||
- Dump a User VM (guest) memory region based on the VM ID (``vm_id``, in decimal),
|
- 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).
|
the start of the memory region ``gva`` (in hexadecimal), and its length ``length`` (in bytes, decimal number).
|
||||||
* - vm_console <vm_id>
|
* - vm_console <vm_id>
|
||||||
- Switch to the VM's console. Use :kbd:`Ctrl` + :kbd:`Alt` + :kbd:`Space` to return to the ACRN
|
- Switch to the VM's console. Use :kbd:`Ctrl` + :kbd:`Alt` + :kbd:`Space` to return to the ACRN
|
||||||
shell console
|
shell console.
|
||||||
* - int
|
* - int
|
||||||
- List interrupt information per CPU
|
- List interrupt information per CPU.
|
||||||
* - pt
|
* - pt
|
||||||
- Show passthrough device information
|
- Show passthrough device information.
|
||||||
* - vioapic <vm_id>
|
* - vioapic <vm_id>
|
||||||
- Show virtual IOAPIC (vIOAPIC) information for a specific VM
|
- Show virtual IOAPIC (vIOAPIC) information for a specific VM.
|
||||||
* - dump_ioapic
|
* - dump_ioapic
|
||||||
- Show native IOAPIC information
|
- Show native IOAPIC information.
|
||||||
* - loglevel <console_loglevel> <mem_loglevel> <npk_loglevel>
|
* - loglevel <console_loglevel> <mem_loglevel> <npk_loglevel>
|
||||||
- * If no parameters are given, the command will return the level of
|
- * If no parameters are given, the command will return the level of
|
||||||
logging for the console, memory and npk
|
logging for the console, memory, and npk.
|
||||||
* Give (up to) three parameters between ``0`` (none) and ``6`` (verbose)
|
* Give (up to) three parameters between ``0`` (none) and ``6`` (verbose)
|
||||||
to set the loglevel for the console, memory, and npk (in
|
to set the loglevel for the console, memory, and npk (in
|
||||||
that order). If fewer than three parameters are given, the
|
that order). If fewer than three parameters are given, the
|
||||||
loglevels for the remaining areas will not be changed
|
loglevels for the remaining areas will not be changed.
|
||||||
* - cpuid <leaf> [subleaf]
|
* - cpuid <leaf> [subleaf]
|
||||||
- Display the CPUID leaf [subleaf], in hexadecimal
|
- Display the CPUID leaf [subleaf], in hexadecimal.
|
||||||
* - rdmsr [-p<pcpu_id>] <msr_index>
|
* - rdmsr [-p<pcpu_id>] <msr_index>
|
||||||
- Read the Model-Specific Register (MSR) at index ``msr_index`` (in
|
- Read the model-specific register (MSR) at index ``msr_index`` (in
|
||||||
hexadecimal) for CPU ID ``pcpu_id``
|
hexadecimal) for CPU ID ``pcpu_id``.
|
||||||
* - wrmsr [-p<pcpu_id>] <msr_index> <value>
|
* - wrmsr [-p<pcpu_id>] <msr_index> <value>
|
||||||
- Write ``value`` (in hexadecimal) to the Model-Specific Register (MSR) at
|
- Write ``value`` (in hexadecimal) to the model-specific register (MSR) at
|
||||||
index ``msr_index`` (in hexadecimal) for CPU ID ``pcpu_id``
|
index ``msr_index`` (in hexadecimal) for CPU ID ``pcpu_id``.
|
||||||
|
|
||||||
Command Examples
|
Command Examples
|
||||||
****************
|
****************
|
||||||
@ -62,7 +62,7 @@ The following sections provide further details and examples for some of these co
|
|||||||
vm_list
|
vm_list
|
||||||
=======
|
=======
|
||||||
|
|
||||||
``vm_list`` provides the name of each virtual machine and its corresponding ID and
|
The ``vm_list`` command provides the name of each virtual machine and its corresponding ID and
|
||||||
state.
|
state.
|
||||||
|
|
||||||
.. figure:: images/shell_image8.png
|
.. figure:: images/shell_image8.png
|
||||||
@ -73,9 +73,9 @@ state.
|
|||||||
vcpu_list
|
vcpu_list
|
||||||
=========
|
=========
|
||||||
|
|
||||||
``vcpu_list`` provides information about virtual CPUs (vCPU), including
|
The ``vcpu_list`` command provides information about virtual CPUs (vCPU), including
|
||||||
the VM ID, PCPU ID, VCPU ID, VCPU ROLE (primary or secondary), and VCPU
|
the VM ID, pCPU ID, vCPU ID, vCPU role (primary or secondary), and vCPU
|
||||||
STATE (init, paused, running, zombie or unknown).
|
state (init, paused, running, zombie, or unknown).
|
||||||
|
|
||||||
.. figure:: images/shell_image7.png
|
.. figure:: images/shell_image7.png
|
||||||
:align: center
|
:align: center
|
||||||
@ -85,10 +85,10 @@ STATE (init, paused, running, zombie or unknown).
|
|||||||
vcpu_dumpreg
|
vcpu_dumpreg
|
||||||
============
|
============
|
||||||
|
|
||||||
``vcpu_dumpreg vmid cpuid`` provides vCPU related information such as
|
The ``vcpu_dumpreg <vm_id> <vcpu_id>`` command provides vCPU-related
|
||||||
registers values, etc.
|
information such as register values.
|
||||||
|
|
||||||
In the following example, we dump vCPU0 RIP register value and get into
|
In the following example, we dump the vCPU0 RIP register value and get into
|
||||||
the Service VM to search for the currently running function, using these
|
the Service VM to search for the currently running function, using these
|
||||||
commands::
|
commands::
|
||||||
|
|
||||||
@ -110,8 +110,8 @@ function ``acpi_idle_do_entry``.
|
|||||||
dump_host_mem
|
dump_host_mem
|
||||||
=============
|
=============
|
||||||
|
|
||||||
``dump_host_mem hva length`` provides the specified memory target data such as
|
The ``dump_host_mem <hva> <length>`` command provides the specified memory
|
||||||
the physical CPU (pCPU) number, etc.
|
target data such as the physical CPU (pCPU) number.
|
||||||
|
|
||||||
In this example, we know the pCPU active bitmap and physical CPU number
|
In this example, we know the pCPU active bitmap and physical CPU number
|
||||||
physical memory address through
|
physical memory address through
|
||||||
@ -119,7 +119,7 @@ physical memory address through
|
|||||||
``acrn.map`` depends on how we build the hypervisor.)
|
``acrn.map`` depends on how we build the hypervisor.)
|
||||||
|
|
||||||
Then we can dump the memory address of the pCPU active bitmap and CPU
|
Then we can dump the memory address of the pCPU active bitmap and CPU
|
||||||
number, we will know that pCPU active bitmap is 0x000000000000000f and
|
number. The pCPU active bitmap is 0x000000000000000f and
|
||||||
pCPU number is 0x0000000000000004.
|
pCPU number is 0x0000000000000004.
|
||||||
|
|
||||||
.. figure:: images/shell_image12.png
|
.. figure:: images/shell_image12.png
|
||||||
@ -135,12 +135,12 @@ pCPU number is 0x0000000000000004.
|
|||||||
dump_guest_mem
|
dump_guest_mem
|
||||||
==============
|
==============
|
||||||
|
|
||||||
The ``dump_guest_mem`` command can dump guest memory according to the given
|
The ``dump_guest_mem <vm_id> <gva> <length>`` command dumps guest memory
|
||||||
VM ID and guest virtual address (``gva``).
|
information according to the given VM ID and guest virtual address (``gva``).
|
||||||
|
|
||||||
In this example, we know the starting address of kernel text segment
|
In this example, we know the starting address of the kernel text segment
|
||||||
in guest console or through the ``system.map`` (Note that the path for
|
in the guest console or through the ``system.map``. (Note that the path for
|
||||||
``system.map`` depends on how we build the kernel)
|
``system.map`` depends on how we build the kernel.)
|
||||||
|
|
||||||
.. figure:: images/shell_image19.png
|
.. figure:: images/shell_image19.png
|
||||||
:align: center
|
:align: center
|
||||||
@ -155,14 +155,15 @@ in guest console or through the ``system.map`` (Note that the path for
|
|||||||
vm_console
|
vm_console
|
||||||
===========
|
===========
|
||||||
|
|
||||||
The ``vm_console`` command switches the ACRN's console to become the VM's console.
|
The ``vm_console <vm_id>`` command switches the ACRN's console to become the
|
||||||
|
VM's console.
|
||||||
Press :kbd:`Ctrl` + :kbd:`Alt` + :kbd:`Space` to return to the ACRN shell console.
|
Press :kbd:`Ctrl` + :kbd:`Alt` + :kbd:`Space` to return to the ACRN shell console.
|
||||||
|
|
||||||
vioapic
|
vioapic
|
||||||
=======
|
=======
|
||||||
|
|
||||||
``vioapic <vm_id>`` shows the virtual IOAPIC information for a specific
|
The ``vioapic <vm_id>`` command shows the virtual IOAPIC information for a specific
|
||||||
VM. In the following figure, we show the virtual IOPIC information for
|
VM. In the following figure, we show the virtual IOAPIC information for
|
||||||
VM1:
|
VM1:
|
||||||
|
|
||||||
.. figure:: images/shell_image6.png
|
.. figure:: images/shell_image6.png
|
||||||
@ -173,7 +174,7 @@ VM1:
|
|||||||
dump_ioapic
|
dump_ioapic
|
||||||
===========
|
===========
|
||||||
|
|
||||||
``dump_ioapic`` provides IOAPIC information and we can get IRQ number,
|
The ``dump_ioapic`` command provides IOAPIC information and we can get IRQ number,
|
||||||
IRQ vector number, etc.
|
IRQ vector number, etc.
|
||||||
|
|
||||||
.. figure:: images/shell_image14.png
|
.. figure:: images/shell_image14.png
|
||||||
@ -184,9 +185,9 @@ IRQ vector number, etc.
|
|||||||
pt
|
pt
|
||||||
==
|
==
|
||||||
|
|
||||||
``pt`` provides passthrough detailed information, such as the virtual
|
The ``pt`` command provides passthrough detailed information, such as the
|
||||||
machine number, interrupt type, interrupt request, interrupt vector,
|
virtual machine number, interrupt type, interrupt request, interrupt vector,
|
||||||
trigger mode, etc.
|
and trigger mode.
|
||||||
|
|
||||||
.. figure:: images/shell_image13.png
|
.. figure:: images/shell_image13.png
|
||||||
:align: center
|
:align: center
|
||||||
@ -196,8 +197,8 @@ trigger mode, etc.
|
|||||||
int
|
int
|
||||||
===
|
===
|
||||||
|
|
||||||
``int`` provides interrupt information on all CPUs and their corresponding
|
The ``int`` command provides interrupt information on all CPUs and their
|
||||||
interrupt vector.
|
corresponding interrupt vector.
|
||||||
|
|
||||||
.. figure:: images/shell_image17.png
|
.. figure:: images/shell_image17.png
|
||||||
:align: center
|
:align: center
|
||||||
@ -207,7 +208,7 @@ interrupt vector.
|
|||||||
cpuid
|
cpuid
|
||||||
=====
|
=====
|
||||||
|
|
||||||
``cpuid <leaf> [subleaf]`` provides the CPUID leaf [subleaf] in
|
The ``cpuid <leaf> [subleaf]`` command provides the CPUID leaf [subleaf] in
|
||||||
hexadecimal.
|
hexadecimal.
|
||||||
|
|
||||||
.. figure:: images/shell_image15.png
|
.. figure:: images/shell_image15.png
|
||||||
@ -218,10 +219,10 @@ hexadecimal.
|
|||||||
rdmsr
|
rdmsr
|
||||||
=====
|
=====
|
||||||
|
|
||||||
We can read model specific register (MSR) to get register
|
We can read a model-specific register (MSR) to get register
|
||||||
values through ``rdmsr [-p<pcpu_id>] <msr_index>``.
|
values through ``rdmsr [-p<pcpu_id>] <msr_index>``.
|
||||||
|
|
||||||
In the following example, we can get IA32_APIC_BASE value of pCPU 0 through
|
In the following example, we can get the IA32_APIC_BASE value of pCPU 0 through
|
||||||
the command::
|
the command::
|
||||||
|
|
||||||
rdmsr -p0 1b
|
rdmsr -p0 1b
|
||||||
@ -241,10 +242,10 @@ and see that 1B (Hexadecimal) is the IA32_APIC_BASE MSR address.
|
|||||||
wrmsr
|
wrmsr
|
||||||
=====
|
=====
|
||||||
|
|
||||||
We can write model specific register (MSR) to set register
|
We can write to a model-specific register (MSR) to set register
|
||||||
values through ``wrmsr [-p<pcpu_id>] <msr_index> <value>``.
|
values through ``wrmsr [-p<pcpu_id>] <msr_index> <value>``.
|
||||||
|
|
||||||
In the following example, we can set IA32_APIC_BASE value of pCPU 1 through
|
In the following example, we can set the IA32_APIC_BASE value of pCPU 1 through
|
||||||
the command::
|
the command::
|
||||||
|
|
||||||
wrmsr -p1 1b 0xfee00c00
|
wrmsr -p1 1b 0xfee00c00
|
||||||
|
@ -11,17 +11,17 @@ The ACRN hypervisor supports the following parameter:
|
|||||||
+-----------------+-----------------------------+----------------------------------------------------------------------------------------+
|
+-----------------+-----------------------------+----------------------------------------------------------------------------------------+
|
||||||
| Parameter | Value | Description |
|
| Parameter | Value | Description |
|
||||||
+=================+=============================+========================================================================================+
|
+=================+=============================+========================================================================================+
|
||||||
| | disabled | This disables the serial port completely. |
|
| | disabled | This value disables the serial port completely. |
|
||||||
| +-----------------------------+----------------------------------------------------------------------------------------+
|
| +-----------------------------+----------------------------------------------------------------------------------------+
|
||||||
| ``uart=`` | bdf@<BDF value> | This sets the serial port PCI BDF (in HEX), e.g. ``bdf@0xc1`` |
|
| ``uart=`` | bdf@<BDF value> | This value sets the serial port PCI BDF (in HEX), for example, ``bdf@0xc1``. |
|
||||||
| | | |
|
| | | |
|
||||||
| | | BDF: Bus, Device, and Function (in HEX) of the serial PCI device. The BDF is packed |
|
| | | BDF: Bus, Device, and Function (in HEX) of the serial PCI device. The BDF is packed |
|
||||||
| | | into a 16-bit WORD with format (B:8, D:5, F:3). For example, PCI device ``0:18.1`` |
|
| | | into a 16-bit WORD with format (B:8, D:5, F:3). For example, PCI device ``0:18.1`` |
|
||||||
| | | becomes ``0xc1`` |
|
| | | becomes ``0xc1``. |
|
||||||
| +-----------------------------+----------------------------------------------------------------------------------------+
|
| +-----------------------------+----------------------------------------------------------------------------------------+
|
||||||
| | port@<port address> | This sets the serial port PIO address, e.g. ``uart=port@0x3F8`` |
|
| | port@<port address> | This value sets the serial port PIO address, for example, ``uart=port@0x3F8``. |
|
||||||
| +-----------------------------+----------------------------------------------------------------------------------------+
|
| +-----------------------------+----------------------------------------------------------------------------------------+
|
||||||
| | mmio@<MMIO address> | This sets the serial port MMIO address, e.g. ``uart=mmio@0xfe040000`` |
|
| | mmio@<MMIO address> | This value sets the serial port MMIO address, for example, ``uart=mmio@0xfe040000``. |
|
||||||
+-----------------+-----------------------------+----------------------------------------------------------------------------------------+
|
+-----------------+-----------------------------+----------------------------------------------------------------------------------------+
|
||||||
|
|
||||||
The Generic hypervisor parameters are specified in the GRUB multiboot/multiboot2 command.
|
The Generic hypervisor parameters are specified in the GRUB multiboot/multiboot2 command.
|
||||||
|
Loading…
Reference in New Issue
Block a user