|
gem5
v20.1.0.5
|
VirtIO ring buffer wrapper. More...
Classes | |
| struct | Header |
Public Types | |
| typedef uint16_t | Flags |
| typedef uint16_t | Index |
Public Member Functions | |
| VirtRing (PortProxy &proxy, ByteOrder bo, 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... | |
| ByteOrder | byteOrder |
| Byte order in the ring. 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 491 of file base.hh.
Referenced by VirtQueue::consumeDescriptor().
|
inline |
Update the ring buffer header with data from the guest.
Definition at line 472 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 468 of file base.hh.
Referenced by VirtQueue::setAddress().
|
inline |
Definition at line 504 of file base.hh.
Referenced by VirtQueue::produceDescriptor().
|
inline |
Definition at line 481 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 529 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 527 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().
|
private |
Byte order in the ring.
Definition at line 531 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 518 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 520 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().