40 #ifndef __DEV_VIRTIO_BLOCK_HH__
41 #define __DEV_VIRTIO_BLOCK_HH__
47 struct VirtIOBlockParams;
145 size_t off_data,
size_t size);
157 size_t off_data,
size_t size);
186 #endif // __DEV_VIRTIO_BLOCK_HH__
Base class for all VirtIO-based devices.
static const FeatureBits F_TOPOLOGY
Status read(const BlkRequest &req, VirtDescriptor *desc_chain, size_t off_data, size_t size)
Device read request.
VirtIOBlock(Params *params)
DiskImage & image
Image backing this device.
static const FeatureBits F_SIZE_MAX
Virtqueue for disk requests.
RequestQueue(PortProxy &proxy, uint16_t size, VirtIOBlock &_parent)
static const RequestType T_FLUSH
Flush device buffers.
const Params * params() const
Block device configuration structure.
Status write(const BlkRequest &req, VirtDescriptor *desc_chain, size_t off_data, size_t size)
Device write request.
static const RequestType T_OUT
Write request.
VirtIO block device request as sent by guest.
static const FeatureBits F_GEOMETRY
static const FeatureBits F_RO
static const RequestType T_IN
Read request.
VirtIO descriptor (chain) wrapper.
void onNotifyDescriptor(VirtDescriptor *desc)
Notify queue of pending incoming descriptor.
Basic interface for accessing a disk image.
static const DeviceId ID_BLOCK
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void readConfig(PacketPtr pkt, Addr cfgOffset)
Read from the configuration space of a device.
static const FeatureBits F_BLK_SIZE
This object is a proxy for a structural port, to be used for debug accesses.
static const Status S_IOERR
Request failed due to a device error.
virtual const std::string name() const
static const FeatureBits F_SEG_MAX
uint16_t DeviceId
Device Type (sometimes known as subsystem ID)
struct VirtIOBlock::Config M5_ATTR_PACKED
static const Status S_OK
Request succeeded.
Base wrapper around a virtqueue.
RequestQueue qRequests
Device I/O request queue.
static const Status S_UNSUPP
Request not supported.