vCPU handling functionality. More...
Collaboration diagram for vCPU Support Library:Modules | |
| Extended vCPU support | |
| extended vCPU handling functionality. | |
Data Structures | |
| class | L4vcpu::State |
| C++ implementation of state word in the vCPU area. More... | |
| class | L4vcpu::Vcpu |
| C++ implementation of the vCPU save state area. More... | |
Typedefs | |
| typedef enum l4vcpu_irq_state_t | l4vcpu_irq_state_t |
| IRQ/Event enable and disable flags. | |
Enumerations | |
| enum | l4vcpu_irq_state_t { L4VCPU_IRQ_STATE_DISABLED = 0, L4VCPU_IRQ_STATE_ENABLED = L4_VCPU_F_IRQ } |
| IRQ/Event enable and disable flags. More... | |
Functions | |
| l4vcpu_state_t | l4vcpu_state (l4_vcpu_state_t const *vcpu) L4_NOTHROW |
| Return the state flags of a vCPU. | |
| void | l4vcpu_irq_disable (l4_vcpu_state_t *vcpu) L4_NOTHROW |
| Disable a vCPU for event delivery. | |
| l4vcpu_irq_state_t | l4vcpu_irq_disable_save (l4_vcpu_state_t *vcpu) L4_NOTHROW |
| Disable a vCPU for event delivery and return previous state. | |
| void | l4vcpu_irq_enable (l4_vcpu_state_t *vcpu, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW |
| Enable a vCPU for event delivery. | |
| void | l4vcpu_irq_restore (l4_vcpu_state_t *vcpu, l4vcpu_irq_state_t s, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW |
| Restore a previously saved IRQ/event state. | |
| void | l4vcpu_wait_for_event (l4_vcpu_state_t *vcpu, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW |
| Wait for event. | |
| void | l4vcpu_print_state (l4_vcpu_state_t *vcpu, const char *prefix) L4_NOTHROW |
| Print the state of a vCPU. | |
| int | l4vcpu_is_irq_entry (l4_vcpu_state_t *vcpu) L4_NOTHROW |
| Return whether the entry reason was an IRQ/IPC message. | |
| int | l4vcpu_is_page_fault_entry (l4_vcpu_state_t *vcpu) L4_NOTHROW |
| Return whether the entry reason was a page fault. | |
vCPU handling functionality.
This library provides convenience functionality on top of the l4sys vCPU interface to ease programming. It wraps commonly used code and abstracts architecture depends parts as far as reasonable.
| enum l4vcpu_irq_state_t |
|
inline |
Return the state flags of a vCPU.
| vcpu | Pointer to vCPU area. |
Definition at line 227 of file vcpu.h.
Referenced by l4vcpu_irq_disable_save().
Here is the caller graph for this function:
|
inline |
Disable a vCPU for event delivery.
| vcpu | Pointer to vCPU area. |
Definition at line 234 of file vcpu.h.
References l4_barrier(), and L4_VCPU_F_IRQ.
Referenced by L4vcpu::Vcpu::irq_disable(), and l4vcpu_irq_disable_save().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Disable a vCPU for event delivery and return previous state.
| vcpu | Pointer to vCPU area. |
Definition at line 242 of file vcpu.h.
References l4vcpu_irq_disable(), and l4vcpu_state().
Referenced by L4vcpu::Vcpu::irq_disable_save().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Enable a vCPU for event delivery.
| vcpu | Pointer to vCPU area. |
| utcb | Utcb pointer of the calling vCPU. |
| do_event_work_cb | Call-back function that is called in case an event (such as an interrupt) is pending. |
| setup_ipc | Function call-back that is called right before any IPC operation. |
Definition at line 265 of file vcpu.h.
References EXPECT_TRUE, l4_barrier(), L4_IPC_BOTH_TIMEOUT_0, L4_VCPU_F_IRQ, and L4_VCPU_SF_IRQ_PENDING.
Referenced by L4vcpu::Vcpu::irq_enable(), and l4vcpu_irq_restore().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Restore a previously saved IRQ/event state.
| vcpu | Pointer to vCPU area. |
| s | IRQ state to be restored. |
| utcb | Utcb pointer of the calling vCPU. |
| do_event_work_cb | Call-back function that is called in case an event (such as an interrupt) is pending after enabling. |
| setup_ipc | Function call-back that is called right before any IPC operation. |
Definition at line 284 of file vcpu.h.
References L4_VCPU_F_IRQ, and l4vcpu_irq_enable().
Referenced by L4vcpu::Vcpu::irq_restore().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Wait for event.
| vcpu | Pointer to vCPU area. |
| utcb | Utcb pointer of the calling vCPU. |
| do_event_work_cb | Call-back function that is called when the vCPU awakes and needs to handle an event/IRQ. |
| setup_ipc | Function call-back that is called right before any IPC operation. |
Note that event delivery remains disabled after this function returns.
Definition at line 295 of file vcpu.h.
References L4_IPC_NEVER.
Referenced by L4vcpu::Vcpu::wait_for_event().
Here is the caller graph for this function:| void l4vcpu_print_state | ( | l4_vcpu_state_t * | vcpu, |
| const char * | prefix | ||
| ) |
Print the state of a vCPU.
| vcpu | Pointer to vCPU area. |
| prefix | A prefix for each line printed. |
Referenced by L4vcpu::Vcpu::print_state().
Here is the caller graph for this function:
|
inline |
Return whether the entry reason was an IRQ/IPC message.
| vcpu | Pointer to vCPU area. |
return 0 if not, !=0 otherwise.
Referenced by L4vcpu::Vcpu::is_irq_entry().
Here is the caller graph for this function:
|
inline |
Return whether the entry reason was a page fault.
| vcpu | Pointer to vCPU area. |
return 0 if not, !=0 otherwise.
Referenced by L4vcpu::Vcpu::is_page_fault_entry().
Here is the caller graph for this function: