Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dmop.h File Reference

Go to the source code of this file.

Functions

int dmop_create_ioreq_server (domid_t domid, uint8_t handle_bufioreq, ioservid_t *id)
 Create an I/O request server in the given Xen domain.
int dmop_destroy_ioreq_server (domid_t domid, ioservid_t id)
 Destroy a previously created I/O request server.
int dmop_map_io_range_to_ioreq_server (domid_t domid, ioservid_t id, uint32_t type, uint64_t start, uint64_t end)
 Map a specified I/O address range to an existing I/O request server.
int dmop_unmap_io_range_from_ioreq_server (domid_t domid, ioservid_t id, uint32_t type, uint64_t start, uint64_t end)
 Unmap an I/O address range from an I/O request server.
int dmop_set_ioreq_server_state (domid_t domid, ioservid_t id, uint8_t enabled)
 Enable or disable an existing I/O request server.
int dmop_nr_vcpus (domid_t domid)
 Query the number of virtual CPUs in a Xen domain.
int dmop_set_irq_level (domid_t domid, uint32_t irq, uint8_t level)
 Set the interrupt level for a specific IRQ in a Xen domain.

Function Documentation

◆ dmop_create_ioreq_server()

int dmop_create_ioreq_server ( domid_t domid,
uint8_t handle_bufioreq,
ioservid_t * id )

Create an I/O request server in the given Xen domain.

This function issues the XEN_DMOP_create_ioreq_server hypercall to create a server that handles I/O requests on behalf of the guest domain.

Parameters
domidXen domain identifier where the server is created.
handle_bufioreqFlag indicating whether buffered I/O requests should be handled. Set to non-zero to enable buffered handling.
idOutput pointer to receive the newly created server ID.
Return values
0On success
-errnoNegative errno code on failure.

◆ dmop_destroy_ioreq_server()

int dmop_destroy_ioreq_server ( domid_t domid,
ioservid_t id )

Destroy a previously created I/O request server.

Issues the XEN_DMOP_destroy_ioreq_server hypercall to tear down the specified I/O request server.

Parameters
domidXen domain identifier where the server exists.
idI/O request server ID returned by dmop_create_ioreq_server().
Return values
0On success
-errnoNegative errno code on failure.

◆ dmop_map_io_range_to_ioreq_server()

int dmop_map_io_range_to_ioreq_server ( domid_t domid,
ioservid_t id,
uint32_t type,
uint64_t start,
uint64_t end )

Map a specified I/O address range to an existing I/O request server.

This function issues the XEN_DMOP_map_io_range_to_ioreq_server hypercall to grant access to the given I/O address range for the specified server.

Parameters
domidXen domain identifier where the mapping is applied.
idI/O request server ID returned by dmop_create_ioreq_server().
typeType identifier for the I/O range (e.g., MMIO, port I/O).
startStart physical address of the I/O range.
endEnd physical address (inclusive) of the I/O range.
Return values
0On success
-errnoNegative errno code on failure.

◆ dmop_nr_vcpus()

int dmop_nr_vcpus ( domid_t domid)

Query the number of virtual CPUs in a Xen domain.

This function issues the XEN_DMOP_nr_vcpus hypercall to retrieve the current vCPU count for the specified domain.

Parameters
domidXen domain identifier to query.
Return values
num_vcpusThe number of vCPUs on success.
-errnoNegative errno code on failure.

◆ dmop_set_ioreq_server_state()

int dmop_set_ioreq_server_state ( domid_t domid,
ioservid_t id,
uint8_t enabled )

Enable or disable an existing I/O request server.

This function issues the XEN_DMOP_set_ioreq_server_state hypercall to change the operational state of the specified I/O request server.

Parameters
domidXen domain identifier.
idI/O request server ID to modify.
enabledNon-zero to enable the server, zero to disable it.
Return values
0On success
-errnoNegative errno code on failure.

◆ dmop_set_irq_level()

int dmop_set_irq_level ( domid_t domid,
uint32_t irq,
uint8_t level )

Set the interrupt level for a specific IRQ in a Xen domain.

This function issues the XEN_DMOP_set_irq_level hypercall to adjust the signal level (assert or deassert) for the given IRQ line.

Parameters
domidXen domain identifier.
irqIRQ number whose level is to be set.
levelNon-zero to assert (raise) the IRQ, zero to deassert (lower) it.
Return values
0On success
-errnoNegative errno code on failure.

◆ dmop_unmap_io_range_from_ioreq_server()

int dmop_unmap_io_range_from_ioreq_server ( domid_t domid,
ioservid_t id,
uint32_t type,
uint64_t start,
uint64_t end )

Unmap an I/O address range from an I/O request server.

Issues the XEN_DMOP_unmap_io_range_from_ioreq_server hypercall to revoke access to a previously mapped I/O address range.

Parameters
domidXen domain identifier where the unmapping is applied.
idI/O request server ID returned by dmop_create_ioreq_server().
typeType identifier for the I/O range (e.g., MMIO, port I/O).
startStart physical address of the I/O range.
endEnd physical address (inclusive) of the I/O range.
Return values
0On success
-errnoNegative errno code on failure.