hv:doc:use doxyen-generated API docs in HDL for vIRQ

Adds below header files to the input of doxygen
 and replaces hard-coded API docs with doxyen-generated ones:

 - vlapic.h
 - vioapic.h
 - vpic.h
 - irq.h

Tracked-On: #1595
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang 2018-11-01 22:30:47 +08:00 committed by David Kinder
parent cbe0313588
commit d2d0cbc661
2 changed files with 54 additions and 39 deletions

View File

@ -796,6 +796,10 @@ INPUT = custom-doxygen/mainpage.md \
../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/arch/x86/vtd.h \
../hypervisor/include/arch/x86/irq.h \
../hypervisor/include/arch/x86/guest/vlapic.h \
../hypervisor/include/arch/x86/guest/vioapic.h \
../hypervisor/include/arch/x86/guest/vpic.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 \

View File

@ -94,30 +94,29 @@ an interrupt, for example:
These APIs will finish by making a request for *ACRN_REQUEST_EVENT.* These APIs will finish by making a request for *ACRN_REQUEST_EVENT.*
lapic_intr_level .. doxygenfunction:: vlapic_intr_level
used by HV to issue a level triggered vector to vLAPIC. This vector :project: Project ACRN
will update into IRR registers
lapic_intr_edge .. doxygenfunction:: vlapic_intr_edge
used by HV to issue an edge triggered vector to vLAPIC. This vector :project: Project ACRN
will update into IRR registers
lapic_intr_msi .. doxygenfunction:: vlapic_intr_accepted
Used by HV to issue a MSI to vLAPIC. This vector will update into IRR :project: Project ACRN
registers
vlapic_set_local_intr .. doxygenfunction:: vlapic_pending_intr
Triggers the LAPIC local interrupt (LVT) 'vector' on 'cpu'. 'cpu' can :project: Project ACRN
be set to -1 to trigger the interrupt on all CPUs.
vlapic_pending_intr .. doxygenfunction:: vlapic_set_local_intr
Check if vLAPIC has pending vector and return the vector with highest :project: Project ACRN
priority if there is pending virtual interrupts.
vlapic_intr_accepted .. doxygenfunction:: vlapic_intr_msi
Used in case of no APICv support. If a vector triggers the vLAPIC, :project: Project ACRN
this vector is then moved from IRR registers to ISR registers. It
indicates the vector is accepted by Guest and Guest is processing it. .. doxygenfunction:: vlapic_post_intr
:project: Project ACRN
.. doxygenfunction:: apicv_get_pir_desc_paddr
:project: Project ACRN
EOI processing EOI processing
============== ==============
@ -145,15 +144,11 @@ vLAPIC APIs.
**Supported APIs:** **Supported APIs:**
vioapic_assert_irq .. doxygenfunction:: vioapic_set_irq
assert a PIN according to active low or active high. :project: Project ACRN
vioapic_deassert_irq .. doxygenfunction:: vioapic_set_irq_nolock
de-assert a PIN according to assigned device or emulated device :project: Project ACRN
status.
vioapic_pulse_irq
trigger an edge interrupt.
Virtual PIC Virtual PIC
*********** ***********
@ -170,20 +165,18 @@ If an interrupt source from vPIC need to inject an interrupt, the
following APIs need be called, which will finally make a request for following APIs need be called, which will finally make a request for
*ACRN_REQUEST_EXTINT or ACRN_REQUEST_EVENT*: *ACRN_REQUEST_EXTINT or ACRN_REQUEST_EVENT*:
.. code-block:: c .. doxygenfunction:: vpic_set_irq
:project: Project ACRN
int vpic_assert_irq(struct vm *vm, uint32_t irq);
int vpic_deassert_irq(struct vm *vm, uint32_t irq);
int vpic_pulse_irq(struct vm *vm, uint32_t irq);
The following APIs are used to query the vector needed to be injected and ACK The following APIs are used to query the vector needed to be injected and ACK
the service (means move the interrupt from request service - IRR to in the service (means move the interrupt from request service - IRR to in
service - ISR): service - ISR):
.. code-block:: c .. doxygenfunction:: vpic_pending_intr
:project: Project ACRN
void vpic_pending_intr(struct vm *vm, uint32_t *vecptr); .. doxygenfunction:: vpic_intr_accepted
void vpic_intr_accepted(struct vm *vm, uint32_t vector); :project: Project ACRN
Virtual Exception Virtual Exception
***************** *****************
@ -198,11 +191,29 @@ hypervisor, for example:
ACRN hypervisor implements virtual exception injection using these APIs: ACRN hypervisor implements virtual exception injection using these APIs:
.. code-block:: c .. doxygenfunction:: vcpu_queue_exception
:project: Project ACRN
int vcpu_queue_exception(struct vcpu *vcpu, uint32_t vector, uint32_t err_code); .. doxygenfunction:: vcpu_inject_extint
int vcpu_inject_gp(struct vcpu *vcpu, uint32_t err_code); :project: Project ACRN
int vcpu_inject_pf(struct vcpu *vcpu, uint64_t addr, uint32_t err_code);
.. doxygenfunction:: vcpu_inject_nmi
:project: Project ACRN
.. doxygenfunction:: vcpu_inject_gp
:project: Project ACRN
.. doxygenfunction:: vcpu_inject_pf
:project: Project ACRN
.. doxygenfunction:: vcpu_inject_ud
:project: Project ACRN
.. doxygenfunction:: vcpu_inject_ac
:project: Project ACRN
.. doxygenfunction:: vcpu_inject_ss
:project: Project ACRN
ACRN hypervisor uses the *vcpu_inject_gp/vcpu_inject_pf* functions ACRN hypervisor uses the *vcpu_inject_gp/vcpu_inject_pf* functions
to queue exception request, and follows SDM vol3 - 6.15, Table 6-5 to to queue exception request, and follows SDM vol3 - 6.15, Table 6-5 to