diff --git a/doc/developer-guides/hld/ahci-hld.rst b/doc/developer-guides/hld/ahci-hld.rst new file mode 100644 index 000000000..d027eeb76 --- /dev/null +++ b/doc/developer-guides/hld/ahci-hld.rst @@ -0,0 +1,44 @@ +.. _ahci-hld: + +AHCI Virtualization in Device Model +################################### + +AHCI (Advanced Host Controller Interface), which is a hardware mechanism +that allows software to communicate with Serial ATA devices. AHCI HBA +(host bus adapters) is a PCI class device that acts as a data movement +engine between system memory and Serial ATA devices. The ACPI HBA in +ACRN support both ATA and ATAPI devices. The architecture is shown in +below diagram. + +.. figure:: images/ahci-image1.png + :align: center + :width: 750px + :name: achi-device + +HBA is registered to PCI system with device id 0x2821 and vendor id +0x8086. And its memory registers are mapped in BAR 5. It only supports 6 +ports refer to ICH8 AHCI. AHCI driver in Guest OS can access HBA in DM +through the PCI BAR. And HBA can inject MSI interrupts through PCI +framework. + +When application in Guest OS reads data from /dev/sda, the request will +send through the AHCI driver then the PCI driver. Guest VM will trap to +hypervisor, and hypervisor dispatch the request to DM. According to the +offset in the BAR, the request will dispatch to port control handler. +Then the request is parse to a block I/O request which can be processed +by Block backend model. + +Usage: + +***-s ,ahci,*** + +Type:  ‘hd’ and ‘cd’ are available. + +Filepath:  the path for the backend file, could be a partition or a +regular file. + +E.g. + + SOS: -s 20,ahci,\ `hd:/dev/mmcblk0p1 `__ + + UOS: /dev/sda diff --git a/doc/developer-guides/hld/hld-emulated-devices.rst b/doc/developer-guides/hld/hld-emulated-devices.rst index 5a9aeca10..ed4fb7353 100644 --- a/doc/developer-guides/hld/hld-emulated-devices.rst +++ b/doc/developer-guides/hld/hld-emulated-devices.rst @@ -14,4 +14,5 @@ documented in this section. usb-virt-hld UART virtualization Watchdoc virtualization + AHCI virtualization GVT-g GPU Virtualization diff --git a/doc/developer-guides/hld/images/ahci-image1.png b/doc/developer-guides/hld/images/ahci-image1.png new file mode 100644 index 000000000..e3dca9ce1 Binary files /dev/null and b/doc/developer-guides/hld/images/ahci-image1.png differ