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