Skip to content

Commit 9493fcd

Browse files
yliu80wenlingz
authored andcommitted
doc: add ahci virtualization introduction
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
1 parent 2cfcb62 commit 9493fcd

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. _ahci-hld:
2+
3+
AHCI Virtualization in Device Model
4+
###################################
5+
6+
AHCI (Advanced Host Controller Interface), which is a hardware mechanism
7+
that allows software to communicate with Serial ATA devices. AHCI HBA
8+
(host bus adapters) is a PCI class device that acts as a data movement
9+
engine between system memory and Serial ATA devices. The ACPI HBA in
10+
ACRN support both ATA and ATAPI devices. The architecture is shown in
11+
below diagram.
12+
13+
.. figure:: images/ahci-image1.png
14+
:align: center
15+
:width: 750px
16+
:name: achi-device
17+
18+
HBA is registered to PCI system with device id 0x2821 and vendor id
19+
0x8086. And its memory registers are mapped in BAR 5. It only supports 6
20+
ports refer to ICH8 AHCI. AHCI driver in Guest OS can access HBA in DM
21+
through the PCI BAR. And HBA can inject MSI interrupts through PCI
22+
framework.
23+
24+
When application in Guest OS reads data from /dev/sda, the request will
25+
send through the AHCI driver then the PCI driver. Guest VM will trap to
26+
hypervisor, and hypervisor dispatch the request to DM. According to the
27+
offset in the BAR, the request will dispatch to port control handler.
28+
Then the request is parse to a block I/O request which can be processed
29+
by Block backend model.
30+
31+
Usage:
32+
33+
***-s <slot>,ahci,<type:><filepath>***
34+
35+
Type:  ‘hd’ and ‘cd’ are available.
36+
37+
Filepath:  the path for the backend file, could be a partition or a
38+
regular file.
39+
40+
E.g.
41+
42+
SOS: -s 20,ahci,\ `hd:/dev/mmcblk0p1 <http://hd/dev/mmcblk0p1>`__
43+
44+
UOS: /dev/sda

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ documented in this section.
1414
usb-virt-hld
1515
UART virtualization <uart-virt-hld>
1616
Watchdoc virtualization <watchdog-hld>
17+
AHCI virtualization <ahci-hld>
1718
GVT-g GPU Virtualization <hld-APL_GVT-g>
49.2 KB
Loading

0 commit comments

Comments
 (0)