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