Skip to content

Commit 4e540e5

Browse files
junjiemao1dbkinder
authored andcommitted
HV: doc: use doxygen-generated API docs in HLD
This patch adds ioreq.h to the input of doxygen and replaces hard-coded API docs with doxygen-generated ones. Tracked-On: #1595 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
1 parent e0fcb70 commit 4e540e5

File tree

2 files changed

+29
-40
lines changed

2 files changed

+29
-40
lines changed

doc/acrn.doxyfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ INPUT = custom-doxygen/mainpage.md \
802802
../hypervisor/include/arch/x86/guest/vlapic.h \
803803
../hypervisor/include/arch/x86/guest/vioapic.h \
804804
../hypervisor/include/arch/x86/guest/vpic.h \
805+
../hypervisor/include/arch/x86/ioreq.h \
805806
../hypervisor/include/common/hypercall.h \
806807
../hypervisor/include/public/acrn_common.h \
807808
../hypervisor/include/public/acrn_hv_defs.h \

doc/developer-guides/hld/hv-io-emulation.rst

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -299,66 +299,54 @@ Initialization and Deinitialization
299299

300300
The following structure represents a port I/O handler:
301301

302-
.. note:: add reference to vm_io_handler_desc definition in ioreq.h
302+
.. doxygenstruct:: vm_io_handler_desc
303+
:project: Project ACRN
303304

304305
The following structure represents a MMIO handler.
305306

306-
.. note:: add reference to mem_io_node definition in ioreq.h
307-
307+
.. doxygenstruct:: mem_io_node
308+
:project: Project ACRN
308309

309310
The following APIs are provided to initialize, deinitialize or configure
310311
I/O bitmaps and register or unregister I/O handlers:
311312

312-
.. code-block:: c
313-
314-
/* Initialize the I/O bitmap for vm. */
315-
void setup_io_bitmap(struct vm *vm)
316-
317-
/* Allow a VM to access a port I/O range.
318-
* This API enables direct access from the given vm to the port I/O space
319-
* starting from address_arg to address_arg + nbytes - 1.
320-
*/
321-
void allow_guest_io_access(struct vm *vm, uint32_t address_arg, uint32_t nbytes)
313+
.. doxygenfunction:: setup_io_bitmap
314+
:project: Project ACRN
322315

323-
/* Free I/O bitmaps and port I/O handlers of vm. */
324-
void free_io_emulation_resource(struct vm *vm)
316+
.. doxygenfunction:: allow_guest_pio_access
317+
:project: Project ACRN
325318

326-
/* Register a port I/O handler. */
327-
void register_io_emulation_handler(struct vm *vm, struct vm_io_range *range,
328-
io_read_fn_t io_read_fn_ptr, io_write_fn_t io_write_fn_ptr)
319+
.. doxygenfunction:: free_io_emulation_resource
320+
:project: Project ACRN
329321

330-
/* Register a MMIO handler. */
331-
int register_mmio_emulation_handler(struct vm *vm, hv_mem_io_handler_t read_write,
332-
uint64_t start, uint64_t end, void *handler_private_data)
322+
.. doxygenfunction:: register_io_emulation_handler
323+
:project: Project ACRN
333324

334-
/* Unregister a MMIO handler.*/
335-
void unregister_mmio_emulation_handler(struct vm *vm, uint64_t start, uint64_t end)
325+
.. doxygenfunction:: register_mmio_emulation_handler
326+
:project: Project ACRN
336327

337-
.. note:: change these to reference API material from ioreq.h
328+
.. doxygenfunction:: unregister_mmio_emulation_handler
329+
:project: Project ACRN
338330

339331
I/O Emulation
340332
=============
341333

342334
The following APIs are provided for I/O emulation at runtime:
343335

344-
.. code-block:: c
345-
346-
/* Emulate the given I/O access for vcpu. */
347-
int32_t emulate_io(struct vcpu *vcpu, struct io_request *io_req)
348-
349-
/* Deliver io_req to SOS and suspend vcpu till its completion. */
350-
int32_t acrn_insert_request_wait(struct vcpu *vcpu, struct io_request *io_req)
336+
.. doxygenfunction:: emulate_io
337+
:project: Project ACRN
351338

352-
/* General post-work for port I/O emulation. */
353-
void emulate_io_post(struct vcpu *vcpu)
339+
.. doxygenfunction:: acrn_insert_request_wait
340+
:project: Project ACRN
354341

355-
/* General post-work for MMIO emulation. */
356-
void emulate_mmio_post(struct vcpu *vcpu, struct io_request *io_req)
342+
.. doxygenfunction:: emulate_io_post
343+
:project: Project ACRN
357344

358-
/* Post-work of I/O requests for MMIO. */
359-
void dm_emulate_mmio_post(struct vcpu *vcpu)
345+
.. doxygenfunction:: emulate_mmio_post
346+
:project: Project ACRN
360347

361-
/* The handler of VM exits on I/O instructions. */
362-
int32_t pio_instr_vmexit_handler(struct vcpu *vcpu)
348+
.. doxygenfunction:: dm_emulate_mmio_post
349+
:project: Project ACRN
363350

364-
.. note:: change these to reference API material from ioreq.h
351+
.. doxygenfunction:: pio_instr_vmexit_handler
352+
:project: Project ACRN

0 commit comments

Comments
 (0)