gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::VirtIODeviceBase Class Reference

Base class for all VirtIO-based devices. More...

#include <base.hh>

Inheritance diagram for gem5::VirtIODeviceBase:
gem5::SimObject gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named gem5::VirtIO9PBase gem5::VirtIOBlock gem5::VirtIOConsole gem5::VirtIODummyDevice gem5::VirtIORng gem5::VirtIO9PProxy gem5::VirtIO9PDiod gem5::VirtIO9PSocket

Public Types

typedef uint16_t QueueID
 
typedef uint32_t FeatureBits
 
typedef uint16_t VirtAddress
 This is a VirtQueue address as exposed through the low-level interface. The address needs to be multiplied by the page size (seems to be hardcoded to 4096 in the spec) to get the real physical address.
 
typedef uint16_t DeviceId
 Device Type (sometimes known as subsystem ID)
 
- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 

Public Member Functions

 BitUnion8 (DeviceStatus) Bitfield< 7 > failed
 
 EndBitUnion (DeviceStatus) typedef VirtIODeviceBaseParams Params
 
 VirtIODeviceBase (const Params &params, DeviceId id, size_t config_size, FeatureBits features)
 
virtual ~VirtIODeviceBase ()
 
SimObject Interfaces
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
Optional VirtIO Interfaces
virtual void readConfig (PacketPtr pkt, Addr cfgOffset)
 Read from the configuration space of a device.
 
virtual void writeConfig (PacketPtr pkt, Addr cfgOffset)
 Write to the configuration space of a device.
 
virtual void reset ()
 Driver-request device reset.
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
virtual void init ()
 init() is called after all C++ SimObjects have been created and all ports are connected.
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint.
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint.
 
virtual void regProbePoints ()
 Register probe points for this object.
 
virtual void regProbeListeners ()
 Register probe listeners for this object.
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object.
 
virtual PortgetPort (const std::string &if_name, PortID idx=InvalidPortID)
 Get a port with a given name and index.
 
virtual void startup ()
 startup() is the final initialization call before simulation.
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining.
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes.
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers.
 
- Public Member Functions inherited from gem5::EventManager
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick) -1)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers.
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue.
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section.
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object.
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object.
 
virtual void notifyFork ()
 Notify a child process of a fork.
 
- Public Member Functions inherited from gem5::statistics::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group.
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters.
 
virtual void resetStats ()
 Callback to reset stats.
 
virtual void preDumpStats ()
 Callback before stats are dumped.
 
void addStat (statistics::Info *info)
 Register a stat with this group.
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object.
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object.
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block.
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group.
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block.
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 

Public Attributes

Bitfield< 2 > driver_ok
 
Bitfield< 1 > driver
 
Bitfield< 0 > acknowledge
 

Private Member Functions

const VirtQueuegetCurrentQueue () const
 Convenience method to get the currently selected queue.
 
VirtQueuegetCurrentQueue ()
 Convenience method to get the currently selected queue.
 

Private Attributes

DeviceStatus _deviceStatus
 Status of the device.
 
QueueID _queueSelect
 Queue select register (set by guest)
 
std::vector< VirtQueue * > _queues
 List of virtual queues supported by this device.
 
std::function< void()> transKick
 Callbacks to kick the guest through the transport layer

 

VirtIO Transport Interfaces

const DeviceId deviceId
 Device ID (sometimes known as subsystem ID)
 
const size_t configSize
 Size of the device's configuration space.
 
const FeatureBits deviceFeatures
 Feature set offered by the device.
 
void registerKickCallback (const std::function< void()> &callback)
 Register a callback to kick the guest through the transport interface.
 
void onNotify (QueueID index)
 Driver is requesting service.
 
void setQueueSelect (QueueID idx)
 Change currently active queue.
 
QueueID getQueueSelect () const
 Get the currently active queue.
 
void setQueueAddress (uint32_t address)
 Change the host physical address of the currently active queue.
 
uint32_t getQueueAddress () const
 Get the host physical address of the currently active queue.
 
uint16_t getQueueSize () const
 Get the size (descriptors) of the currently active queue.
 
void setDeviceStatus (DeviceStatus status)
 Update device status and optionally reset device.
 
DeviceStatus getDeviceStatus () const
 Retrieve the device status.
 
void setGuestFeatures (FeatureBits features)
 Set feature bits accepted by the guest driver.
 
FeatureBits getGuestFeatures () const
 Get features accepted by the guest driver.
 

Device Model Interfaces

FeatureBits guestFeatures
 Feature set accepted by the guest.
 
void kick ()
 Inform the guest of available buffers.
 
void registerQueue (VirtQueue &queue)
 Register a new VirtQueue with the device model.
 

Device Model Helpers

ByteOrder byteOrder
 The byte order of the queues, descriptors, etc.
 
void readConfigBlob (PacketPtr pkt, Addr cfgOffset, const uint8_t *cfg)
 Read configuration data from a device structure.
 
void writeConfigBlob (PacketPtr pkt, Addr cfgOffset, uint8_t *cfg)
 Write configuration data to a device structure.
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::SimObject
static void serializeAll (const std::string &cpt_dir)
 Create a checkpoint by serializing all SimObjects in the system.
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it.
 
static void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints.
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints.
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section.
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it.
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain.
 
void signalDrainDone () const
 Signal that an object is drained.
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters.
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue.
 

Detailed Description

Base class for all VirtIO-based devices.

This class implements the functionality of the VirtIO 0.9.5 specification. This version of VirtIO is also known as "legacy" in the VirtIO 1.0 specification from OASIS.

See also
https://github.com/rustyrussell/virtio-spec
http://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.html

Definition at line 587 of file base.hh.

Member Typedef Documentation

◆ DeviceId

Device Type (sometimes known as subsystem ID)

Definition at line 599 of file base.hh.

◆ FeatureBits

Definition at line 591 of file base.hh.

◆ QueueID

Definition at line 590 of file base.hh.

◆ VirtAddress

This is a VirtQueue address as exposed through the low-level interface. The address needs to be multiplied by the page size (seems to be hardcoded to 4096 in the spec) to get the real physical address.

Definition at line 597 of file base.hh.

Constructor & Destructor Documentation

◆ VirtIODeviceBase()

gem5::VirtIODeviceBase::VirtIODeviceBase ( const Params & params,
DeviceId id,
size_t config_size,
FeatureBits features )

Definition at line 339 of file base.cc.

◆ ~VirtIODeviceBase()

gem5::VirtIODeviceBase::~VirtIODeviceBase ( )
virtual

Definition at line 350 of file base.cc.

Member Function Documentation

◆ BitUnion8()

gem5::VirtIODeviceBase::BitUnion8 ( DeviceStatus )

◆ EndBitUnion()

gem5::VirtIODeviceBase::EndBitUnion ( DeviceStatus )

◆ getCurrentQueue() [1/2]

VirtQueue & gem5::VirtIODeviceBase::getCurrentQueue ( )
private

Convenience method to get the currently selected queue.

Definition at line 468 of file base.cc.

References _queues, _queueSelect, and panic.

◆ getCurrentQueue() [2/2]

const VirtQueue & gem5::VirtIODeviceBase::getCurrentQueue ( ) const
private

Convenience method to get the currently selected queue.

Definition at line 459 of file base.cc.

References _queues, _queueSelect, and panic.

Referenced by getQueueAddress(), getQueueSize(), and setQueueAddress().

◆ getDeviceStatus()

DeviceStatus gem5::VirtIODeviceBase::getDeviceStatus ( ) const
inline

Retrieve the device status.

Returns
Device status.

Definition at line 855 of file base.hh.

References _deviceStatus.

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ getGuestFeatures()

FeatureBits gem5::VirtIODeviceBase::getGuestFeatures ( ) const
inline

Get features accepted by the guest driver.

Returns
Currently active features.

Definition at line 870 of file base.hh.

References guestFeatures.

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ getQueueAddress()

uint32_t gem5::VirtIODeviceBase::getQueueAddress ( ) const

Get the host physical address of the currently active queue.

Note
The new address is specified in multiples of the page size (fixed to 4096 bytes in the standard). For example, if the address 10 is selected, the actual host physical address will be 40960.
See also
setQueueSelect
getQueueSelect
Returns
Address of the currently active queue (in pages).

Definition at line 483 of file base.cc.

References gem5::VirtQueue::ALIGN_BITS, and getCurrentQueue().

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ getQueueSelect()

QueueID gem5::VirtIODeviceBase::getQueueSelect ( ) const
inline

Get the currently active queue.

The transport interface works on a queue at a time. The currently active queue is decided by the value of the queue select field in a device.

Returns
The ID of the currently active queue.

Definition at line 800 of file base.hh.

References _queueSelect.

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ getQueueSize()

uint16_t gem5::VirtIODeviceBase::getQueueSize ( ) const
inline

Get the size (descriptors) of the currently active queue.

Returns
Size of the currently active queue in number of descriptors.

Definition at line 838 of file base.hh.

References getCurrentQueue(), and gem5::VirtQueue::getSize().

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ kick()

void gem5::VirtIODeviceBase::kick ( )
inlineprotected

Inform the guest of available buffers.

When a device model has finished processing incoming buffers (after onNotify has been called), it typically needs to inform the guest that there are new pending outgoing buffers. The method used to inform the guest is transport dependent, but is typically through an interrupt. Device models call this method to tell the transport interface to notify the guest.

Definition at line 638 of file base.hh.

References transKick.

Referenced by gem5::VirtIOBlock::RequestQueue::onNotifyDescriptor(), gem5::VirtIO9PBase::sendRMsg(), and gem5::VirtIOConsole::TermRecvQueue::trySend().

◆ onNotify()

void gem5::VirtIODeviceBase::onNotify ( QueueID index)

Driver is requesting service.

This method is called by the underlying hardware interface (e.g., PciVirtIO or MmmioVirtIO) to notify a device of pending incoming descriptors.

Parameters
indexID of the queue with pending actions.

Definition at line 386 of file base.cc.

References _queues, DPRINTF, and panic.

Referenced by gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), and gem5::RiscvISA::MmioVirtIO::write().

◆ readConfig()

void gem5::VirtIODeviceBase::readConfig ( PacketPtr pkt,
Addr cfgOffset )
virtual

Read from the configuration space of a device.

This method is called by the transport interface to read data from a device model's configuration space. The device model should use the cfgOffset parameter as the offset into its configuration space.

Warning
The address in the packet should not be used to determine the offset into a device's configuration space.
Parameters
pktRead request packet.
cfgOffsetOffset into the device's configuration space.

Reimplemented in gem5::VirtIO9PBase, gem5::VirtIOBlock, gem5::VirtIOConsole, and gem5::VirtIORng.

Definition at line 422 of file base.cc.

References panic.

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ readConfigBlob()

void gem5::VirtIODeviceBase::readConfigBlob ( PacketPtr pkt,
Addr cfgOffset,
const uint8_t * cfg )
protected

Read configuration data from a device structure.

Parameters
pktRead request packet.
cfgOffsetOffset into the device's configuration space.
cfgDevice configuration

Definition at line 434 of file base.cc.

References configSize, gem5::Packet::getSize(), gem5::Packet::makeResponse(), panic, and gem5::Packet::setData().

Referenced by gem5::VirtIO9PBase::readConfig(), gem5::VirtIOBlock::readConfig(), and gem5::VirtIOConsole::readConfig().

◆ registerKickCallback()

void gem5::VirtIODeviceBase::registerKickCallback ( const std::function< void()> & callback)
inline

Register a callback to kick the guest through the transport interface.

Parameters
callbackCallback into transport interface.

Definition at line 762 of file base.hh.

References transKick.

Referenced by gem5::MmioVirtIO::MmioVirtIO(), gem5::RiscvISA::MmioVirtIO::MmioVirtIO(), and gem5::PciVirtIO::PciVirtIO().

◆ registerQueue()

void gem5::VirtIODeviceBase::registerQueue ( VirtQueue & queue)
protected

Register a new VirtQueue with the device model.

Devices typically register at least one VirtQueue to use for communication with the guest. This must be done from the constructor since the number of queues are assumed to be constant throughout the lifetime of the device.

Warning
This method may only be called from the device model constructor.

Definition at line 491 of file base.cc.

References _queues.

Referenced by gem5::VirtIO9PBase::VirtIO9PBase(), gem5::VirtIOBlock::VirtIOBlock(), gem5::VirtIOConsole::VirtIOConsole(), and gem5::VirtIORng::VirtIORng().

◆ reset()

void gem5::VirtIODeviceBase::reset ( )
virtual

Driver-request device reset.

The device driver may reset a device by writing zero to the device status register (using setDeviceStatus()), which causes this method to be called. Device models overriding this method must ensure that the reset method of the base class is called when the device is reset.

Note
Always call the reset method of the base class from device-specific reset methods.

Definition at line 375 of file base.cc.

References _deviceStatus, _queues, _queueSelect, guestFeatures, gem5::ArmISA::i, and reset().

Referenced by reset(), setDeviceStatus(), and gem5::VirtIO9PBase::VirtIO9PBase().

◆ serialize()

void gem5::VirtIODeviceBase::serialize ( CheckpointOut & cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Reimplemented from gem5::SimObject.

Definition at line 355 of file base.cc.

References _deviceStatus, _queues, _queueSelect, gem5::csprintf(), guestFeatures, gem5::ArmISA::i, SERIALIZE_SCALAR, and gem5::Serializable::serializeSection().

Referenced by gem5::VirtIO9PProxy::serialize().

◆ setDeviceStatus()

void gem5::VirtIODeviceBase::setDeviceStatus ( DeviceStatus status)

Update device status and optionally reset device.

The special device status of 0 is used to reset the device by calling reset().

Parameters
statusNew device status.

Definition at line 412 of file base.cc.

References _deviceStatus, DPRINTF, reset(), and gem5::ArmISA::status.

Referenced by gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), and gem5::RiscvISA::MmioVirtIO::write().

◆ setGuestFeatures()

void gem5::VirtIODeviceBase::setGuestFeatures ( FeatureBits features)

Set feature bits accepted by the guest driver.

This enables a subset of the features offered by the device model through the getGuestFeatures() interface.

Definition at line 398 of file base.cc.

References deviceFeatures, DPRINTF, guestFeatures, and panic.

Referenced by gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), and gem5::RiscvISA::MmioVirtIO::write().

◆ setQueueAddress()

void gem5::VirtIODeviceBase::setQueueAddress ( uint32_t address)

Change the host physical address of the currently active queue.

Note
The new address is specified in multiples of the page size (fixed to 4096 bytes in the standard). For example, if the address 10 is selected, the actual host physical address will be 40960.
See also
setQueueSelect
getQueueSelect
Parameters
addressNew address of the currently active queue (in pages).

Definition at line 477 of file base.cc.

References gem5::VirtQueue::ALIGN_SIZE, getCurrentQueue(), and gem5::VirtQueue::setAddress().

Referenced by gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), and gem5::RiscvISA::MmioVirtIO::write().

◆ setQueueSelect()

void gem5::VirtIODeviceBase::setQueueSelect ( QueueID idx)
inline

Change currently active queue.

The transport interface works on a queue at a time. The currently active queue is decided by the value of the queue select field in a device.

Parameters
idxID of the queue to select.

Definition at line 790 of file base.hh.

References _queueSelect.

Referenced by gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), and gem5::RiscvISA::MmioVirtIO::write().

◆ unserialize()

void gem5::VirtIODeviceBase::unserialize ( CheckpointIn & cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Reimplemented from gem5::SimObject.

Definition at line 365 of file base.cc.

References _deviceStatus, _queues, _queueSelect, gem5::csprintf(), guestFeatures, gem5::ArmISA::i, UNSERIALIZE_SCALAR, and gem5::Serializable::unserializeSection().

Referenced by gem5::VirtIO9PProxy::unserialize().

◆ writeConfig()

void gem5::VirtIODeviceBase::writeConfig ( PacketPtr pkt,
Addr cfgOffset )
virtual

Write to the configuration space of a device.

This method is called by the transport interface to write data into a device model's configuration space. The device model should use the cfgOffset parameter as the offset into its configuration space.

Warning
The address in the packet should not be used to determine the offset into a device's configuration space.
Parameters
pktWrite request packet.
cfgOffsetOffset into the device's configuration space.

Definition at line 428 of file base.cc.

References panic.

Referenced by gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), and gem5::RiscvISA::MmioVirtIO::write().

◆ writeConfigBlob()

void gem5::VirtIODeviceBase::writeConfigBlob ( PacketPtr pkt,
Addr cfgOffset,
uint8_t * cfg )
protected

Write configuration data to a device structure.

Parameters
pktWrite request packet.
cfgOffsetOffset into the device's configuration space.
cfgDevice configuration

Definition at line 446 of file base.cc.

References configSize, gem5::Packet::getSize(), gem5::Packet::makeResponse(), panic, and gem5::Packet::writeData().

Member Data Documentation

◆ _deviceStatus

DeviceStatus gem5::VirtIODeviceBase::_deviceStatus
private

Status of the device.

See also
getDeviceStatus
setDeviceStatus

Definition at line 894 of file base.hh.

Referenced by getDeviceStatus(), reset(), serialize(), setDeviceStatus(), and unserialize().

◆ _queues

std::vector<VirtQueue *> gem5::VirtIODeviceBase::_queues
private

List of virtual queues supported by this device.

Definition at line 900 of file base.hh.

Referenced by getCurrentQueue(), getCurrentQueue(), onNotify(), registerQueue(), reset(), serialize(), and unserialize().

◆ _queueSelect

QueueID gem5::VirtIODeviceBase::_queueSelect
private

Queue select register (set by guest)

Definition at line 897 of file base.hh.

Referenced by getCurrentQueue(), getCurrentQueue(), getQueueSelect(), reset(), serialize(), setQueueSelect(), and unserialize().

◆ acknowledge

Bitfield<0> gem5::VirtIODeviceBase::acknowledge

Definition at line 605 of file base.hh.

◆ byteOrder

ByteOrder gem5::VirtIODeviceBase::byteOrder
protected

The byte order of the queues, descriptors, etc.

Definition at line 747 of file base.hh.

Referenced by gem5::VirtIOBlock::readConfig(), gem5::VirtIOConsole::readConfig(), and gem5::VirtIO9PBase::VirtIO9PBase().

◆ configSize

const size_t gem5::VirtIODeviceBase::configSize

Size of the device's configuration space.

Definition at line 876 of file base.hh.

Referenced by gem5::PciVirtIO::PciVirtIO(), readConfigBlob(), gem5::VirtIO9PBase::VirtIO9PBase(), and writeConfigBlob().

◆ deviceFeatures

const FeatureBits gem5::VirtIODeviceBase::deviceFeatures

Feature set offered by the device.

Definition at line 879 of file base.hh.

Referenced by gem5::MmioVirtIO::read(), gem5::PciVirtIO::read(), gem5::RiscvISA::MmioVirtIO::read(), and setGuestFeatures().

◆ deviceId

const DeviceId gem5::VirtIODeviceBase::deviceId

Device ID (sometimes known as subsystem ID)

Definition at line 873 of file base.hh.

Referenced by gem5::PciVirtIO::PciVirtIO(), gem5::MmioVirtIO::read(), and gem5::RiscvISA::MmioVirtIO::read().

◆ driver

Bitfield<1> gem5::VirtIODeviceBase::driver

Definition at line 604 of file base.hh.

◆ driver_ok

Bitfield<2> gem5::VirtIODeviceBase::driver_ok

Definition at line 603 of file base.hh.

◆ guestFeatures

FeatureBits gem5::VirtIODeviceBase::guestFeatures
protected

Feature set accepted by the guest.

When the guest starts the driver for the device, it starts by negotiating features. The device first offers a set of features (see deviceFeatures), the driver then notifies the device of which features it accepted. The base class will automatically accept any feature set that is a subset of the features offered by the device.

Definition at line 668 of file base.hh.

Referenced by getGuestFeatures(), reset(), serialize(), setGuestFeatures(), and unserialize().

◆ transKick

std::function<void()> gem5::VirtIODeviceBase::transKick
private

Callbacks to kick the guest through the transport layer

Definition at line 903 of file base.hh.

Referenced by kick(), and registerKickCallback().


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

Generated on Tue Jun 18 2024 16:24:15 for gem5 by doxygen 1.11.0