gem5
|
#include "arch/isa_traits.hh"
#include "base/bitunion.hh"
#include "base/callback.hh"
#include "dev/virtio/virtio_ring.h"
#include "mem/port_proxy.hh"
#include "sim/sim_object.hh"
Go to the source code of this file.
Classes | |
class | VirtDescriptor |
VirtIO descriptor (chain) wrapper. More... | |
class | VirtQueue |
Base wrapper around a virtqueue. More... | |
class | VirtQueue::VirtRing< T > |
VirtIO ring buffer wrapper. More... | |
struct | VirtQueue::VirtRing< T >::Header |
class | VirtIODeviceBase |
Base class for all VirtIO-based devices. More... | |
class | VirtIODummyDevice |
Functions | |
VirtIO endian conversion helpers | |
VirtIO prior to version 1.0 (legacy versions) normally send values to the host in the guest systems native byte order. This is going to change in version 1.0 which mandates little endian. We currently only support the legacy version of VirtIO (the new and shiny standard is still in a draft state and not implemented by the kernel). Once we support the new standard, we should negotiate the VirtIO version with the guest and automatically use the right type of byte swapping. | |
template<typename T > | |
T | vtoh_legacy (T v) |
Convert legacy VirtIO endianness to host endianness. More... | |
template<typename T > | |
T | htov_legacy (T v) |
Convert host endianness to legacy VirtIO endianness. More... | |
template<> | |
vring_used_elem | vtoh_legacy (vring_used_elem v) |
template<> | |
vring_used_elem | htov_legacy (vring_used_elem v) |
template<> | |
vring_desc | vtoh_legacy (vring_desc v) |
template<> | |
vring_desc | htov_legacy (vring_desc v) |
|
inline |
Convert host endianness to legacy VirtIO endianness.
Definition at line 76 of file base.hh.
References BigEndianGuest::htog().
Referenced by htov_legacy(), VirtIOBlock::RequestQueue::onNotifyDescriptor(), VirtIOConsole::readConfig(), VirtIOBlock::readConfig(), VirtIO9PBase::VirtIO9PBase(), VirtQueue::VirtRing< struct vring_used_elem >::write(), and VirtQueue::VirtRing< struct vring_used_elem >::writeHeader().
|
inline |
Definition at line 89 of file base.hh.
References htov_legacy(), vring_used_elem::id, vring_used_elem::len, and ArmISA::v.
|
inline |
Definition at line 105 of file base.hh.
References vring_desc::addr, vring_desc::flags, htov_legacy(), vring_desc::len, vring_desc::next, and ArmISA::v.
|
inline |
Convert legacy VirtIO endianness to host endianness.
Definition at line 70 of file base.hh.
References BigEndianGuest::gtoh().
Referenced by VirtQueue::VirtRing< struct vring_used_elem >::read(), VirtQueue::VirtRing< struct vring_used_elem >::readHeader(), VirtDescriptor::update(), and vtoh_legacy().
|
inline |
Definition at line 82 of file base.hh.
References vring_used_elem::id, vring_used_elem::len, ArmISA::v, and vtoh_legacy().
|
inline |
Definition at line 96 of file base.hh.
References vring_desc::addr, vring_desc::flags, vring_desc::len, vring_desc::next, ArmISA::v, and vtoh_legacy().