45 explicit State(
unsigned v) : _s(v) {}
52 void add(
unsigned bits)
throw() { _s |= bits; }
59 void clear(
unsigned bits)
throw() { _s &= ~bits; }
66 void set(
unsigned v)
throw() { _s = v; }
147 l4vcpu_setup_ipc_t setup_ipc)
throw()
162 l4vcpu_event_hndl_t do_event_work_cb,
163 l4vcpu_setup_ipc_t setup_ipc)
throw()
178 l4vcpu_setup_ipc_t setup_ipc)
throw()
271 {
return reinterpret_cast<Vcpu *
>(x); }
281 {
return reinterpret_cast<Vcpu *
>(x); }
static Env const * env() noexcept
Returns the initial environment for the current task.
C++ interface for capabilities.
C++ implementation of state word in the vCPU area.
void set(unsigned v)
Set flags.
void add(unsigned bits)
Add flags.
State(unsigned v)
Initialize state.
void clear(unsigned bits)
Clear flags.
C++ implementation of the vCPU save state area.
unsigned irq_disable_save()
Disable the vCPU for event delivery and return previous state.
l4_vcpu_ipc_regs_t const * i() const
Return pointer to IPC state.
State * state()
Get state word.
static Vcpu * cast(void *x)
Cast a void pointer to a class pointer.
int is_irq_entry() const
Return whether the entry reason was an IRQ/IPC message.
static int ext_alloc(Vcpu **vcpu, l4_addr_t *ext_state, L4::Cap< L4::Task > task=L4Re::Env::env() ->task(), L4::Cap< L4Re::Rm > rm=L4Re::Env::env() ->rm())
Allocate state area for an extended vCPU.
void irq_disable()
Disable the vCPU for event delivery.
State state() const
Get state word.
l4_vcpu_ipc_regs_t * i()
Return pointer to IPC state.
static Vcpu * cast(l4_addr_t x)
Cast an address to a class pointer.
l4_vcpu_regs_t const * r() const
Return pointer to register state.
l4_vcpu_regs_t * r()
Return pointer to register state.
void entry_ip(l4_umword_t ip)
Set vCPU entry instruction pointer.
void irq_enable(l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc)
Enable the vCPU for event delivery.
void wait_for_event(l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc)
Wait for event.
void entry_sp(l4_umword_t sp)
Set vCPU entry stack pointer.
void print_state(const char *prefix="") const
Print the state of the vCPU.
void task(L4::Cap< L4::Task > const task=L4::Cap< L4::Task >::Invalid)
Set the task of the vCPU.
l4_uint16_t sticky_flags() const
Get sticky flags.
void irq_restore(unsigned s, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc)
Restore a previously saved IRQ/event state.
State * saved_state()
Get saved_state word.
int is_page_fault_entry() const
Return whether the entry reason was a page fault.
State saved_state() const
Get saved_state word.
int l4vcpu_is_irq_entry(l4_vcpu_state_t const *vcpu) L4_NOTHROW
Return whether the entry reason was an IRQ/IPC message.
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, unsigned 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.
unsigned l4vcpu_irq_disable_save(l4_vcpu_state_t *vcpu) L4_NOTHROW
Disable a vCPU for event delivery and return previous state.
int l4vcpu_is_page_fault_entry(l4_vcpu_state_t const *vcpu) L4_NOTHROW
Return whether the entry reason was a page fault.
void l4vcpu_irq_disable(l4_vcpu_state_t *vcpu) L4_NOTHROW
Disable a vCPU for event delivery.
void l4vcpu_print_state(const l4_vcpu_state_t *vcpu, const char *prefix) L4_NOTHROW
Print the state of a vCPU.
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.
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_addr_t
Address type.
unsigned short int l4_uint16_t
Unsigned 16bit value.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
#define L4_CV
Define calling convention.
l4_umword_t entry_sp
Stack pointer for entry (when coming from user task)
l4_uint16_t sticky_flags
Pending flags. See L4_vcpu_sticky_flags.
l4_uint16_t state
Current vCPU state. See L4_vcpu_state_flags.
l4_vcpu_regs_t r
Register state.
l4_umword_t entry_ip
IP for entry.
l4_cap_idx_t user_task
User task to use.
l4_vcpu_ipc_regs_t i
IPC state.
l4_uint16_t saved_state
Saved vCPU state. See L4_vcpu_state_flags.
vCPU support library (C interface).