L4Re - L4 Runtime Environment

vCPU API More...

+ Collaboration diagram for vCPU API:

Data Structures

struct  l4_vcpu_state_t
 State of a vCPU. More...
 
struct  l4_vcpu_regs_t
 vCPU registers. More...
 
struct  l4_vcpu_ipc_regs_t
 vCPU message registers. More...
 

Typedefs

typedef struct l4_vcpu_state_t l4_vcpu_state_t
 State of a vCPU.
 
typedef struct l4_vcpu_regs_t l4_vcpu_regs_t
 vCPU registers.
 
typedef struct l4_vcpu_ipc_regs_t l4_vcpu_ipc_regs_t
 vCPU message registers.
 
typedef struct l4_vcpu_regs_t l4_vcpu_regs_t
 vCPU registers.
 
typedef struct l4_vcpu_ipc_regs_t l4_vcpu_ipc_regs_t
 vCPU message registers.
 
typedef struct l4_vcpu_regs_t l4_vcpu_regs_t
 vCPU registers.
 
typedef struct l4_vcpu_ipc_regs_t l4_vcpu_ipc_regs_t
 vCPU message registers.
 

Enumerations

enum  L4_vcpu_state_flags {
  L4_VCPU_F_IRQ = 0x01, L4_VCPU_F_PAGE_FAULTS = 0x02, L4_VCPU_F_EXCEPTIONS = 0x04, L4_VCPU_F_DEBUG_EXC = 0x08,
  L4_VCPU_F_USER_MODE = 0x20, L4_VCPU_F_FPU_ENABLED = 0x80
}
 State flags of a vCPU. More...
 
enum  L4_vcpu_sticky_flags { L4_VCPU_SF_IRQ_PENDING = 0x01 }
 Sticky flags of a vCPU. More...
 
enum  L4_vcpu_state_offset { L4_VCPU_OFFSET_EXT_STATE = 0x400, L4_VCPU_OFFSET_EXT_INFOS = 0x200 }
 Offsets for vCPU state layouts. More...
 

Detailed Description

vCPU API

The vCPU API in L4Re implements virtual processors (vCPUs) on top of L4::Thread. This API can be used for user level threading, operating system rehosting (see L4Linux) and virtualization.

You switch a thread into vCPU operation with L4::Thread::vcpu_control.

Extended vCPU operation is used for hardware CPU virtualization. It can be enabled with L4::Thread::vcpu_control_ext.

vCPU Support Library defines a convenience API for working with vCPUs.

See also
vCPU Support Library

Enumeration Type Documentation

◆ L4_vcpu_state_flags

State flags of a vCPU.

Enumerator
L4_VCPU_F_IRQ 

IRQs (events) enabled.

L4_VCPU_F_PAGE_FAULTS 

Page faults enabled.

L4_VCPU_F_EXCEPTIONS 

Exception enabled.

L4_VCPU_F_DEBUG_EXC 

Debug exception enabled.

L4_VCPU_F_USER_MODE 

User task will be used.

L4_VCPU_F_FPU_ENABLED 

FPU enabled.

Definition at line 71 of file vcpu.h.

◆ L4_vcpu_state_offset

Offsets for vCPU state layouts.

Enumerator
L4_VCPU_OFFSET_EXT_STATE 

Offset where extended state begins.

L4_VCPU_OFFSET_EXT_INFOS 

Offset where extended infos begin.

Definition at line 94 of file vcpu.h.

◆ L4_vcpu_sticky_flags

Sticky flags of a vCPU.

Enumerator
L4_VCPU_SF_IRQ_PENDING 

An event (e.g. IRQ) is pending.

Definition at line 85 of file vcpu.h.