gem5
|
VirtIO ring buffer wrapper. More...
Classes | |
struct | Header |
Public Types | |
typedef uint16_t | Flags |
typedef uint16_t | Index |
Public Member Functions | |
VirtRing (PortProxy &proxy, uint16_t size) | |
void | setAddress (Addr addr) |
Set the base address of the VirtIO ring buffer. More... | |
void | readHeader () |
Update the ring buffer header with data from the guest. More... | |
void | writeHeader () |
void | read () |
void | write () |
Public Attributes | |
struct VirtQueue::VirtRing::Header | M5_ATTR_PACKED |
Header | header |
Ring buffer header in host byte order. More... | |
std::vector< T > | ring |
Elements in ring in host byte order. More... | |
Private Member Functions | |
VirtRing () | |
Private Attributes | |
PortProxy & | _proxy |
Guest physical memory proxy. More... | |
Addr | _base |
Guest physical base address of the ring buffer. More... | |
VirtIO ring buffer wrapper.
This class wraps a VirtIO ring buffer. The template parameter T is used to select the data type for the items in the ring (used or available descriptors).
typedef uint16_t VirtQueue::VirtRing< T >::Flags |
typedef uint16_t VirtQueue::VirtRing< T >::Index |
|
inline |
|
private |
|
inline |
Definition at line 508 of file base.hh.
Referenced by VirtQueue::consumeDescriptor().
|
inline |
Update the ring buffer header with data from the guest.
Definition at line 493 of file base.hh.
Referenced by VirtQueue::produceDescriptor(), and VirtQueue::VirtRing< struct vring_used_elem >::read().
|
inline |
Set the base address of the VirtIO ring buffer.
addr | New host physical address |
Definition at line 490 of file base.hh.
Referenced by VirtQueue::setAddress().
|
inline |
Definition at line 519 of file base.hh.
Referenced by VirtQueue::produceDescriptor().
|
inline |
Definition at line 500 of file base.hh.
Referenced by VirtQueue::VirtRing< struct vring_used_elem >::write().
|
private |
Guest physical base address of the ring buffer.
Definition at line 543 of file base.hh.
Referenced by VirtQueue::VirtRing< struct vring_used_elem >::read(), VirtQueue::VirtRing< struct vring_used_elem >::readHeader(), VirtQueue::VirtRing< struct vring_used_elem >::setAddress(), VirtQueue::VirtRing< struct vring_used_elem >::write(), and VirtQueue::VirtRing< struct vring_used_elem >::writeHeader().
|
private |
Guest physical memory proxy.
Definition at line 541 of file base.hh.
Referenced by VirtQueue::VirtRing< struct vring_used_elem >::read(), VirtQueue::VirtRing< struct vring_used_elem >::readHeader(), VirtQueue::VirtRing< struct vring_used_elem >::write(), and VirtQueue::VirtRing< struct vring_used_elem >::writeHeader().
Header VirtQueue::VirtRing< T >::header |
Ring buffer header in host byte order.
Definition at line 532 of file base.hh.
Referenced by VirtQueue::consumeDescriptor(), VirtQueue::produceDescriptor(), VirtQueue::VirtRing< struct vring_used_elem >::read(), VirtQueue::VirtRing< struct vring_used_elem >::readHeader(), VirtQueue::VirtRing< struct vring_used_elem >::write(), and VirtQueue::VirtRing< struct vring_used_elem >::writeHeader().
struct VirtQueue::VirtRing::Header VirtQueue::VirtRing< T >::M5_ATTR_PACKED |
std::vector<T> VirtQueue::VirtRing< T >::ring |
Elements in ring in host byte order.
Definition at line 534 of file base.hh.
Referenced by VirtQueue::consumeDescriptor(), VirtQueue::produceDescriptor(), VirtQueue::VirtRing< struct vring_used_elem >::read(), and VirtQueue::VirtRing< struct vring_used_elem >::write().