mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-01 17:52:26 +00:00
hv: doc: use doxygen-generated API docs in HLD for vtd
This patch adds vtd.h to the input of doxygen and replaces hard-coded API docs with doxygen-generated ones. Tracked-On: #1595 Signed-off-by: Binbin Wu <binbin.wu@intel.com>
This commit is contained in:
parent
1776d7e7fc
commit
4b3b11552d
@ -795,6 +795,7 @@ INPUT = custom-doxygen/mainpage.md \
|
|||||||
../hypervisor/include/arch/x86/mmu.h \
|
../hypervisor/include/arch/x86/mmu.h \
|
||||||
../hypervisor/include/arch/x86/mtrr.h \
|
../hypervisor/include/arch/x86/mtrr.h \
|
||||||
../hypervisor/include/arch/x86/pgtable.h \
|
../hypervisor/include/arch/x86/pgtable.h \
|
||||||
|
../hypervisor/include/arch/x86/vtd.h \
|
||||||
../hypervisor/include/common/hypercall.h \
|
../hypervisor/include/common/hypercall.h \
|
||||||
../hypervisor/include/public/acrn_common.h \
|
../hypervisor/include/public/acrn_common.h \
|
||||||
../hypervisor/include/public/acrn_hv_defs.h \
|
../hypervisor/include/public/acrn_hv_defs.h \
|
||||||
|
@ -297,76 +297,38 @@ handler will be called to report error event.
|
|||||||
Data structures and interfaces
|
Data structures and interfaces
|
||||||
******************************
|
******************************
|
||||||
|
|
||||||
.. note:: Needs API reference to include/arch/x86/vtd.h
|
|
||||||
|
|
||||||
initialization and deinitialization
|
initialization and deinitialization
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
The following APIs are provided during initialization and
|
The following APIs are provided during initialization and
|
||||||
deinitialization:
|
deinitialization:
|
||||||
|
|
||||||
- void init_iommu(void)
|
.. doxygenfunction:: init_iommu
|
||||||
|
:project: Project ACRN
|
||||||
|
|
||||||
Register DMAR units on the platform according to the reparsed
|
.. doxygenfunction:: init_iommu_vm0_domain
|
||||||
information or DMAR table.
|
:project: Project ACRN
|
||||||
|
|
||||||
- void init_iommu_vm0_domain(struct vm \*vm0)
|
runtime
|
||||||
|
=======
|
||||||
Create VM0 domain using the Normal World's EPT table of VM0 as address
|
|
||||||
translation table. Add all PCI devices on the platform to VM0 domain. Then enable
|
|
||||||
DMAR translation.
|
|
||||||
|
|
||||||
- void destroy_iommu_domain(struct iommu_domain \*domain)
|
|
||||||
|
|
||||||
Destroy the iommu domain.
|
|
||||||
|
|
||||||
VT-d
|
|
||||||
====
|
|
||||||
|
|
||||||
The following API are provided during runtime:
|
The following API are provided during runtime:
|
||||||
|
|
||||||
- void suspend_iommu(void)
|
.. doxygenfunction:: create_iommu_domain
|
||||||
|
:project: Project ACRN
|
||||||
|
|
||||||
Suspend IOMMU.
|
.. doxygenfunction:: destroy_iommu_domain
|
||||||
|
:project: Project ACRN
|
||||||
|
|
||||||
- void resume_iommu(void)
|
.. doxygenfunction:: suspend_iommu
|
||||||
|
:project: Project ACRN
|
||||||
|
|
||||||
Resume IOMMU.
|
.. doxygenfunction:: resume_iommu
|
||||||
|
:project: Project ACRN
|
||||||
|
|
||||||
- struct iommu_domain \*create_iommu_domain(uint16_t vm_id,
|
.. doxygenfunction:: assign_iommu_device
|
||||||
uint64_t translation_table, uint32_t addr_width)
|
:project: Project ACRN
|
||||||
|
|
||||||
Create a iommu domain for a VM specified by vm_id.
|
.. doxygenfunction:: unassign_iommu_device
|
||||||
translation_table should be the physical address of EPT table of the VM
|
:project: Project ACRN
|
||||||
specified by the vm_id, the value cannot be NULL.
|
|
||||||
Return the iommu_domain created for the VM if not NULL.
|
|
||||||
Error if the return NULL.
|
|
||||||
|
|
||||||
- int assign_iommu_device(struct iommu_domain \*domain, uint8_t
|
|
||||||
bus, uint8_t devfun)
|
|
||||||
|
|
||||||
Assign a device specified by bus & devfun to a iommu domain. The device
|
|
||||||
is removed from VM0 domain and added to the domain specified.
|
|
||||||
|
|
||||||
domain: specified the domain the device should be assigned to.
|
|
||||||
|
|
||||||
bus: the 8-bit bus value of the pass-through device.
|
|
||||||
|
|
||||||
devfun: the 8-bit device function value of the pass-through device.
|
|
||||||
|
|
||||||
return: return 0 if success, other if error.
|
|
||||||
|
|
||||||
- int unassign_iommu_device(struct iommu_domain \*domain,
|
|
||||||
|
|
||||||
uint8_t bus, uint8_t devfun);
|
|
||||||
|
|
||||||
Unassign a device specified by bus & devfun from a iommu domain.
|
|
||||||
|
|
||||||
domain: specified the domain the device should be removed from.
|
|
||||||
|
|
||||||
bus: the 8-bit bus value of the pass-through device.
|
|
||||||
|
|
||||||
devfun: the 8-bit device function value of the pass-through device.
|
|
||||||
|
|
||||||
return: return 0 if success, other if error.
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user