Skip to content

Commit 6ca4095

Browse files
deb-inteldbkinder
authored andcommitted
Update pages with missing links
Signed-off-by: Deb Taylor <deb.taylor@intel.com> Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1 parent 2d57c5f commit 6ca4095

10 files changed

+51
-37
lines changed

doc/developer-guides/hld/hld-devicemodel.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ framework. There are 3 major subsystems in SOS:
3636
- VHM driver notifies HV on the completion through hypercall
3737
- DM injects VIRQ to UOS frontend device through hypercall
3838

39-
- VHM: Virtio and HV service Module is a kernel module in SOS as a
40-
middle layer to support DM. Refer to chapter 5.4 for details
39+
- VHM: Virtio and Hypervisor Service Module is a kernel module in SOS as a
40+
middle layer to support DM. Refer to :ref:`virtio-APIs` for details
4141

42-
This chapter introduces how the acrn-dm application is configured and
43-
walks through the DM overall flow. We'll then elaborate on device,
42+
This section introduces how the acrn-dm application is configured and
43+
walks through the DM overall flow. We'll then elaborate on device,
4444
ISA, and PCI emulation.
4545

4646
Configuration
@@ -140,8 +140,8 @@ DM Initialization
140140
allocated by DM for a specific VM in user space. This buffer is
141141
shared between DM, VHM and HV. **Set I/O Request buffer** calls
142142
an ioctl executing a hypercall to share this unique page buffer
143-
with VHM and HV. Please refer to chapter 3.4 and 4.4 for more
144-
details.
143+
with VHM and HV. Refer to :ref:`hld-io-emulation` and
144+
:ref:`IO-emulation-in-sos` for more details.
145145

146146
- **Memory Setup**: UOS memory is allocated from SOS
147147
memory. This section of memory will use SOS hugetlbfs to allocate
@@ -158,11 +158,11 @@ DM Initialization
158158
API and PIO handler by *register_inout()* API or INOUT_PORT()
159159
macro.
160160

161-
- **PCI Init**: PCI initialization scans PCI bus/slot/function to
161+
- **PCI Init**: PCI initialization scans the PCI bus/slot/function to
162162
identify each configured PCI device on the acrn-dm command line
163163
and initializes their configuration space by calling their
164-
dedicated vdev_init() function. For more detail of DM PCI
165-
emulation please refer to section 4.6.
164+
dedicated vdev_init() function. For more details on the DM PCI
165+
emulation, refer to `PCI Emulation`_.
166166

167167
- **ACPI Build**: If there is "-A" option in acrn-dm command line, DM
168168
will build ACPI table into its VM's F-Segment (0xf2400). This
@@ -296,6 +296,8 @@ VHM ioctl interfaces
296296
IRQ and Interrupts, Device Model management, Guest Memory management,
297297
PCI assignment, and Power management
298298

299+
.. _IO-emulation-in-sos:
300+
299301
I/O Emulation in SOS
300302
********************
301303

doc/developer-guides/hld/hld-trace-log.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ synchronize access by the producer and consumer.
3333
sbuf APIs
3434
=========
3535

36-
.. note:: reference APIs defined in hypervisor/include/debug/sbuf.h
36+
The sbuf APIs are defined in ``hypervisor/include/debug/sbuf.h``
3737

3838

3939
ACRN Trace
@@ -67,8 +67,8 @@ up:
6767
Trace APIs
6868
==========
6969

70-
.. note:: reference APIs defined in hypervisor/include/debug/trace.h
71-
for trace_entry struct and functions.
70+
See ``hypervisor/include/debug/trace.h``
71+
for trace_entry struct and function APIs.
7272

7373

7474
SOS Trace Module
@@ -92,8 +92,10 @@ ACRNTrace application includes a binary to retrieve trace data from
9292
Sbuf, and Python scripts to convert trace data from raw format into
9393
readable text, and do analysis.
9494

95-
Figure 2.2 shows the sequence of trace initialization and trace data
96-
collection. With a debug build, trace components are initialized at boot
95+
.. note:: There was no Figure showing the sequence of trace
96+
initialization and trace data collection.
97+
98+
With a debug build, trace components are initialized at boot
9799
time. After initialization, HV writes trace event date into sbuf
98100
until sbuf is full, which can happen easily if the ACRNTrace app is not
99101
consuming trace data from Sbuf on SOS user space.
@@ -103,7 +105,6 @@ created to periodically read RAW trace data from sbuf and write to a
103105
file.
104106

105107
.. note:: figure is missing
106-
107108
Figure 2.2 Sequence of trace init and trace data collection
108109

109110
These are the Python scripts provided:

doc/developer-guides/hld/hld-virtio-devices.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ The workflow can be summarized as:
398398
6. irqfd related logic inject an interrupt through vhm interrupt API.
399399
7. interrupt is delivered to UOS FE driver through hypervisor.
400400

401+
.. _virtio-APIs:
402+
401403
Virtio APIs
402404
***********
403405

doc/developer-guides/hld/hv-cpu-virt.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,9 @@ A bitmap in the vCPU structure lists the different requests:
484484
485485
486486
ACRN provides the function *vcpu_make_request* to make different
487-
requests, set the bitmap of corresponding request, and notify the target vCPU
488-
through IPI if necessary (when the target vCPU is not currently running). See
489-
section 3.5.5 for details.
487+
requests, set the bitmap of the corresponding request, and notify the target
488+
vCPU through the IPI if necessary (when the target vCPU is not currently
489+
running). See :ref:`vcpu-request-interrupt-injection` for details.
490490

491491
.. code-block:: c
492492
@@ -579,8 +579,8 @@ entry control and exit control, as shown in the table below.
579579
The table briefly shows how each field got configured.
580580
The guest state field is critical for a guest CPU start to run
581581
based on different CPU modes. One structure *boot_ctx* is used to pass
582-
the necessary initialized guest state to VMX,
583-
used only for the BSP of a guest.
582+
the necessary initialized guest state to VMX, used only for the BSP of a
583+
guest.
584584

585585
For a guest vCPU's state initialization:
586586

@@ -879,9 +879,9 @@ exit reason for reading or writing these MSRs is respectively
879879
*VMX_EXIT_REASON_RDMSR* or *VMX_EXIT_REASON_WRMSR* and the vm exit
880880
handler is *rdmsr_vmexit_handler* or *wrmsr_vmexit_handler*.
881881

882-
This table shows the predefined MSRs ACRN will trap
883-
for all the guests. For the MSRs whose bitmap are not set in the
884-
MSR bitmap, guest access will be pass-through directly:
882+
This table shows the predefined MSRs ACRN will trap for all the guests. For
883+
the MSRs whose bitmap are not set in the MSR bitmap, guest access will be
884+
pass-through directly:
885885

886886
.. list-table::
887887
:widths: 33 33 33

doc/developer-guides/hld/hv-dev-passthrough.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ model.
131131
this, device model is linked with lib pci access to access physical PCI
132132
device.
133133

134+
.. _interrupt-remapping:
135+
134136
Interrupt Remapping
135137
*******************
136138

doc/developer-guides/hld/hv-interrupt.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ default assigned to SOS. Any interrupts received by Guest VM (SOS or
6464
UOS) device drivers are virtual interrupts injected by HV (via vLAPIC).
6565
HV manages a Host-to-Guest mapping. When a native IRQ/interrupt occurs,
6666
HV decides whether this IRQ/interrupt should be forwarded to a VM and
67-
which VM to forward to (if any). Refer to section 3.7.6 for virtual
68-
interrupt injection and section 3.9.6 for the management of interrupt
69-
remapping.
67+
which VM to forward to (if any). Refer to
68+
:ref:`virt-interrupt-injection` and :ref:`interrupt-remapping` for
69+
more information.
7070

7171
HV does not own any exceptions. Guest VMCS are configured so no VM Exit
7272
happens, with some exceptions such as #INT3 and #MC. This is to
@@ -88,6 +88,8 @@ sources:
8888
- Inter CPU IPI
8989
- LAPIC timer
9090

91+
.. _physical-interrupt-initialization:
92+
9193
Physical Interrupt Initialization
9294
*********************************
9395

@@ -356,8 +358,7 @@ IPI Management
356358
The only purpose of IPI use in HV is to kick a vCPU out of non-root mode
357359
and enter to HV mode. This requires I/O request and virtual interrupt
358360
injection be distributed to different IPI vectors. The I/O request uses
359-
IPI vector 0xF4 upcall (refer to Chapter 5.4). The virtual interrupt
360-
injection uses IPI vector 0xF0.
361+
IPI vector 0xF4 upcall. The virtual interrupt injection uses IPI vector 0xF0.
361362

362363
0xF4 upcall
363364
A Guest vCPU VM Exit exits due to EPT violation or IO instruction trap.

doc/developer-guides/hld/hv-io-emulation.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ buffer on VM creation, otherwise I/O accesses from UOS cannot be
116116
emulated by SOS, and all I/O accesses not handled by the I/O handlers in
117117
the hypervisor will be dropped (reads get all 1's).
118118

119-
Refer to Section 4.4.1 for the details of I/O requests and the
119+
Refer to the following sections for details on I/O requests and the
120120
initialization of the I/O request buffer.
121121

122122
Types of I/O Requests
@@ -267,8 +267,7 @@ External Interfaces
267267

268268
The following structures represent an I/O request. *struct vhm_request*
269269
is the main structure and the others are detailed representations of I/O
270-
requests of different kinds. Refer to Section 4.4.4 for the usage of
271-
*struct pci_request*.
270+
requests of different kinds.
272271

273272
.. doxygenstruct:: mmio_request
274273
:project: Project ACRN
@@ -285,7 +284,7 @@ requests of different kinds. Refer to Section 4.4.4 for the usage of
285284
.. doxygenstruct:: vhm_request
286285
:project: Project ACRN
287286

288-
For hypercalls related to I/O emulation, refer to Section 3.11.4.
287+
For hypercalls related to I/O emulation, refer to `I/O Emulation in the Hypervisor`_.
289288

290289
.. _io-handler-init:
291290

doc/developer-guides/hld/hv-startup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Memory
9595
interrupt stack table (IST) which are different across physical
9696
processors. LDT is disabled.
9797

98-
Refer to section 3.5.2 for a detailed description of interrupt-related
98+
Refer to :ref:`physical-interrupt-initialization` for a detailed description of interrupt-related
9999
initial states, including IDT and physical PICs.
100100

101101
After BSP detects that all APs are up, BSP will start creating the first

doc/developer-guides/hld/hv-virt-interrupt.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ management, which includes:
1414
A guest VM never owns any physical interrupts. All interrupts received by
1515
Guest OS come from a virtual interrupt injected by vLAPIC, vIOAPIC or
1616
vPIC. Such virtual interrupts are triggered either from a pass-through
17-
device or from I/O mediators in SOS via hypercalls. Section 3.8.6
18-
introduces how the hypervisor manages the mapping between physical and
19-
virtual interrupts for pass-through devices.
17+
device or from I/O mediators in SOS via hypercalls. The
18+
:ref:`interrupt-remapping` section discusses how the hypervisor manages
19+
the mapping between physical and virtual interrupts for pass-through
20+
devices.
2021

2122
Emulation for devices is inside SOS user space device model, i.e.,
2223
acrn-dm. However for performance consideration: vLAPIC, vIOAPIC, and vPIC
@@ -33,6 +34,8 @@ options to guest Linux affects whether it uses PIC or IOAPIC:
3334
- **Kernel boot param with vIOAPIC**: add "maxcpu=1" (as long as not "0")
3435
Guest OS will use IOAPIC. And Keep IOAPIC pin2 as source of PIC.
3536

37+
.. _vcpu-request-interrupt-injection:
38+
3639
vCPU Request for Interrupt Injection
3740
************************************
3841

@@ -213,6 +216,8 @@ ACRN hypervisor uses the *vcpu_inject_gp/vcpu_inject_pf* functions
213216
to queue exception request, and follows SDM vol3 - 6.15, Table 6-5 to
214217
generate double fault if the condition is met.
215218

219+
.. _virt-interrupt-injection:
220+
216221
Virtual Interrupt Injection
217222
***************************
218223

@@ -223,7 +228,7 @@ devices.
223228
directly. Whenever there is a device's physical interrupt, the
224229
corresponding virtual interrupts are injected to SOS via
225230
vLAPIC/vIOAPIC. SOS does not use vPIC and does not have emulated
226-
devices. See section 3.8.5 Device assignment.
231+
devices. See :ref:`device-assignment`.
227232

228233
- **For UOS assigned devices**: only PCI devices could be assigned to
229234
UOS. Virtual interrupt injection follows the same way as SOS. A

doc/developer-guides/hld/hv-vt-d.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ as address translation table when creating SOS_VM as Service OS. And all
257257
PCI devices on the platform are added to SOS_VM domain. Then enable DMAR
258258
translation for DMAR unit(s) if they are not marked as ignored.
259259

260+
.. _device-assignment:
261+
260262
Device assignment
261263
*****************
262264

0 commit comments

Comments
 (0)