libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::Guest Class Referenceabstract

Base interface for a Guest. More...

#include <Guest.hh>

Inheritance diagram for introvirt::Guest:

Public Member Functions

virtual OS os () const =0
 Get the Guest OS type.
 
virtual bool x64 () const =0
 Check if the guest is 64-bit.
 
virtual guest_ptr< void > allocate (size_t &region_size, bool executable=false)=0
 Allocate a region of memory in the guest.
 
virtual void guest_free (const guest_ptr< void > &ptr, size_t region_size)=0
 Free a region of memory in the guest.
 
virtual bool page_in (Event &event, uint64_t virtual_address)=0
 
virtual GuestImpl & impl ()=0
 Used internally.
 
virtual const GuestImpl & impl () const =0
 
virtual ~Guest ()=default
 Destroy the instance.
 

Detailed Description

Base interface for a Guest.

A "guest" is the operating system running in a domain.

Constructor & Destructor Documentation

◆ ~Guest()

virtual introvirt::Guest::~Guest ( )
virtualdefault

Destroy the instance.

Member Function Documentation

◆ allocate()

virtual guest_ptr< void > introvirt::Guest::allocate ( size_t &  region_size,
bool  executable = false 
)
pure virtual

Allocate a region of memory in the guest.

Parameters
region_sizeThe requested size of the region in bytes. May be rounded up.
executableAllow the region of memory to be executable
Returns
guest_ptr<void> A pointer to the newly allocated region

◆ guest_free()

virtual void introvirt::Guest::guest_free ( const guest_ptr< void > &  ptr,
size_t  region_size 
)
pure virtual

Free a region of memory in the guest.

Parameters
ptrThe base address to free
region_sizeThe number of bytes to free

◆ impl() [1/2]

virtual const GuestImpl & introvirt::Guest::impl ( ) const
pure virtual

◆ impl() [2/2]

virtual GuestImpl & introvirt::Guest::impl ( )
pure virtual

Used internally.

Returns
GuestImpl&

◆ os()

virtual OS introvirt::Guest::os ( ) const
pure virtual

Get the Guest OS type.

Returns
The Guest OS type
Examples
ivguestinfo.cc.

◆ page_in()

virtual bool introvirt::Guest::page_in ( Event event,
uint64_t  virtual_address 
)
pure virtual

Page in the given virtual address for the current process

◆ x64()

virtual bool introvirt::Guest::x64 ( ) const
pure virtual

Check if the guest is 64-bit.

Returns
true if the guest is 64-bit
false if the guest is 32-bit

The documentation for this class was generated from the following file: