gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
VirtIOBlock::RequestQueue Class Reference

Virtqueue for disk requests. More...

#include <block.hh>

Inheritance diagram for VirtIOBlock::RequestQueue:
VirtQueue Serializable

Public Member Functions

 RequestQueue (PortProxy &proxy, uint16_t size, VirtIOBlock &_parent)
 
virtual ~RequestQueue ()
 
void onNotifyDescriptor (VirtDescriptor *desc)
 Notify queue of pending incoming descriptor. More...
 
std::string name () const
 
- Public Member Functions inherited from VirtQueue
virtual ~VirtQueue ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
void setAddress (Addr address)
 Set the base address of this queue. More...
 
Addr getAddress () const
 Get the guest physical address of this queue. More...
 
uint16_t getSize () const
 Get the number of descriptors available in this queue. More...
 
VirtDescriptorgetDescriptor (VirtDescriptor::Index index)
 Get a pointer to a specific descriptor in the queue. More...
 
VirtDescriptorconsumeDescriptor ()
 Get an incoming descriptor chain from the queue. More...
 
void produceDescriptor (VirtDescriptor *desc, uint32_t len)
 Send a descriptor chain to the guest. More...
 
virtual void onNotify ()
 Notify queue of pending events. More...
 
void dump () const
 Dump the contents of a queue. More...
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Protected Attributes

VirtIOBlockparent
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from VirtQueue
static const unsigned ALIGN_BITS = 12
 Page size used by VirtIO. It's hard-coded to 4096 bytes in the spec for historical reasons. More...
 
static const unsigned ALIGN_SIZE = 1 << ALIGN_BITS
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Member Functions inherited from VirtQueue
 VirtQueue (PortProxy &proxy, uint16_t size)
 Instantiate a new virtqueue. More...
 

Detailed Description

Virtqueue for disk requests.

Definition at line 163 of file block.hh.

Constructor & Destructor Documentation

VirtIOBlock::RequestQueue::RequestQueue ( PortProxy proxy,
uint16_t  size,
VirtIOBlock _parent 
)
inline

Definition at line 167 of file block.hh.

virtual VirtIOBlock::RequestQueue::~RequestQueue ( )
inlinevirtual

Definition at line 169 of file block.hh.

Member Function Documentation

std::string VirtIOBlock::RequestQueue::name ( ) const
inline

Definition at line 173 of file block.hh.

References SimObject::name(), and parent.

void VirtIOBlock::RequestQueue::onNotifyDescriptor ( VirtDescriptor desc)
virtual

Notify queue of pending incoming descriptor.

This method is called by the default implementation of onNotify() to notify the device model of pending data in a descriptor chain.

Device models should normally overload one of onNotify() and onNotifyDescriptor().

Reimplemented from VirtQueue.

Definition at line 125 of file block.cc.

References VirtDescriptor::chainRead(), VirtDescriptor::chainSize(), VirtDescriptor::chainWrite(), DPRINTF, htov_legacy(), VirtIODeviceBase::kick(), parent, VirtQueue::produceDescriptor(), VirtIOBlock::read(), VirtIOBlock::S_OK, VirtIOBlock::S_UNSUPP, VirtDescriptor::size(), ArmISA::status, VirtIOBlock::T_FLUSH, VirtIOBlock::T_IN, VirtIOBlock::T_OUT, warn, and VirtIOBlock::write().

Member Data Documentation

VirtIOBlock& VirtIOBlock::RequestQueue::parent
protected

Definition at line 176 of file block.hh.

Referenced by name(), and onNotifyDescriptor().


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

Generated on Fri Jun 9 2017 13:04:23 for gem5 by doxygen 1.8.6