54 std::function<
void(
Event&)> callback) = 0;
68 uint64_t length,
bool read,
bool write,
70 std::function<
void(
Event&)> callback) = 0;
80 std::function<
void(
Event&)> callback) = 0;
109 virtual std::string
name()
const = 0;
120 virtual uint32_t
id()
const = 0;
134 virtual const Vcpu&
vcpu(uint32_t index)
const = 0;
214 virtual std::shared_ptr<GuestMemoryMapping>
map_pfns(
const uint64_t* pfns,
215 size_t count)
const = 0;
A class representing a single Domain.
Definition Domain.hh:44
virtual void suspend_event_step(Event &event)=0
Mark an event as suspended for single step.
virtual const Vcpu & vcpu(uint32_t index) const =0
Get a vcpu by index.
virtual std::string name() const =0
Get the name of the Domain, if it exists.
virtual void intercept_cr_writes(int cr, bool enabled)=0
Toggle control register write interception on all VCPUs.
virtual bool detect_guest()=0
Attempt guest OS detection.
virtual void intercept_system_calls(bool enabled)=0
Toggle system call interception for all VCPUs.
virtual uint32_t vcpu_count() const =0
Get the number of vcpus in the Domain.
virtual std::shared_ptr< Breakpoint > create_breakpoint(const guest_ptr< void > &address, std::function< void(Event &)> callback)=0
Create an execution breakpoint.
virtual void poll(EventCallback &callback)=0
Poll for events and deliver them to the callback.
virtual Vcpu & vcpu(uint32_t index)=0
Get a vcpu by index.
virtual Guest * guest()=0
Get the guest detected by detect_guest()
virtual SystemCallFilter & system_call_filter()=0
Get the system call filter for this Domain.
virtual ~Domain()=default
Destroy the instance.
virtual const Hypervisor & hypervisor() const =0
Gets the hypervisor that the Domain is running on.
static Domain & thread_local_domain()
Get the domain for the current thread.
virtual void interrupt()=0
Interrupt a poll() call.
virtual std::unique_ptr< SingleStep > single_step(Vcpu &vcpu, std::function< void(Event &)> callback)=0
Start single stepping a VCPU.
virtual TaskFilter & task_filter()=0
Get the task filter for this domain.
virtual uint32_t id() const =0
Get the id of the Domain.
virtual std::shared_ptr< GuestMemoryMapping > map_pfns(const uint64_t *pfns, size_t count) const =0
Map a list of pfns into our address space.
virtual void suspend_event(Event &event)=0
Mark an event as suspended.
virtual void pause()=0
Pause the entire Domain.
virtual std::unique_ptr< Watchpoint > create_watchpoint(const guest_ptr< void > &address, uint64_t length, bool read, bool write, bool execute, std::function< void(Event &)> callback)=0
Create a watchpoint on guest memory (e.g. break on read/write)
virtual const SystemCallFilter & system_call_filter() const =0
Get the system call filter for this Domain.
virtual const x86::PageDirectory & page_directory() const =0
Get the page directory for address translation.
virtual const Guest * guest() const =0
Get the guest detected by detect_guest()
virtual void resume()=0
Resume the Domain.
Interface for an event poller callback.
Definition EventCallback.hh:29
Interface class for hypervisor events.
Definition Event.hh:43
Base interface for a Guest.
Definition Guest.hh:35
Abstract class for managing a hypervisor.
Definition Hypervisor.hh:48
Base class for system call filtering.
Definition SystemCallFilter.hh:35
Filter to remove events based on task.
Definition TaskFilter.hh:34
A class representing a single virtual processor.
Definition Vcpu.hh:33
Definition guest_ptr.hh:88
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20