Go to the source code of this file.
|
void | vio_legacy_dump_registers (VirtIODevice *vdev) |
|
static void | vio_legacy_get_config (VirtIODevice *vdev, unsigned offset, void *buf, unsigned len) |
|
static void | vio_legacy_set_config (VirtIODevice *vdev, unsigned offset, const void *buf, unsigned len) |
|
static u8 | vio_legacy_get_status (VirtIODevice *vdev) |
|
static void | vio_legacy_set_status (VirtIODevice *vdev, u8 status) |
|
static void | vio_legacy_reset (VirtIODevice *vdev) |
|
static u64 | vio_legacy_get_features (VirtIODevice *vdev) |
|
static NTSTATUS | vio_legacy_set_features (VirtIODevice *vdev, u64 features) |
|
static u16 | vio_legacy_set_config_vector (VirtIODevice *vdev, u16 vector) |
|
static u16 | vio_legacy_set_queue_vector (struct virtqueue *vq, u16 vector) |
|
static NTSTATUS | vio_legacy_query_vq_alloc (VirtIODevice *vdev, unsigned index, unsigned short *pNumEntries, unsigned long *pRingSize, unsigned long *pHeapSize) |
|
static NTSTATUS | vio_legacy_setup_vq (struct virtqueue **queue, VirtIODevice *vdev, VirtIOQueueInfo *info, unsigned index, u16 msix_vec) |
|
static void | vio_legacy_del_vq (VirtIOQueueInfo *info) |
|
NTSTATUS | vio_legacy_initialize (VirtIODevice *vdev) |
|
◆ vio_legacy_del_vq()
Definition at line 232 of file VirtIOPCILegacy.c.
233{
236
238
242
244 }
245
246
248
250}
#define VIRTIO_MSI_QUEUE_VECTOR
#define VIRTIO_MSI_NO_VECTOR
#define VIRTIO_PCI_QUEUE_SEL
#define VIRTIO_PCI_QUEUE_PFN
#define mem_free_contiguous_pages(vdev, virt)
#define iowrite32(vdev, val, addr)
#define iowrite16(vdev, val, addr)
#define ioread8(vdev, addr)
◆ vio_legacy_dump_registers()
Definition at line 50 of file VirtIOPCILegacy.c.
51{
53
62}
#define DPrintf(Level, Fmt)
#define VIRTIO_PCI_QUEUE_NUM
#define VIRTIO_PCI_HOST_FEATURES
#define VIRTIO_PCI_STATUS
#define VIRTIO_PCI_QUEUE_NOTIFY
#define VIRTIO_PCI_GUEST_FEATURES
#define ioread32(vdev, addr)
◆ vio_legacy_get_config()
Definition at line 64 of file VirtIOPCILegacy.c.
68{
72
74
75 for (
i = 0;
i <
len;
i++) {
77 }
78}
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define VIRTIO_PCI_CONFIG(msix_enabled)
◆ vio_legacy_get_features()
◆ vio_legacy_get_status()
◆ vio_legacy_initialize()
Definition at line 269 of file VirtIOPCILegacy.c.
270{
273
276 }
277
279
281
283}
static const struct virtio_device_ops virtio_pci_device_ops
GLuint GLsizei GLsizei * length
const struct virtio_device_ops * device
#define STATUS_INSUFFICIENT_RESOURCES
#define pci_map_address_range(vdev, bar, offset, maxlen)
#define pci_get_resource_len(vdev, bar)
Referenced by virtio_device_initialize().
◆ vio_legacy_query_vq_alloc()
Definition at line 149 of file VirtIOPCILegacy.c.
154{
155 unsigned long ring_size, data_size;
157
158
160
161
165 }
166
169
171 *pRingSize = ring_size + data_size;
172 *pHeapSize = 0;
173
175}
unsigned int vring_control_block_size(u16 qsize, bool packed)
#define VIRTIO_PCI_VRING_ALIGN
#define ioread16(vdev, addr)
unsigned long vring_size(unsigned int num, unsigned long align, bool packed)
#define ROUND_TO_PAGES(Size)
Referenced by vio_legacy_setup_vq().
◆ vio_legacy_reset()
◆ vio_legacy_set_config()
◆ vio_legacy_set_config_vector()
Definition at line 131 of file VirtIOPCILegacy.c.
132{
133
135
136
138}
#define VIRTIO_MSI_CONFIG_VECTOR
◆ vio_legacy_set_features()
Definition at line 119 of file VirtIOPCILegacy.c.
120{
121
123
124
127
129}
void vring_transport_features(VirtIODevice *vdev, u64 *features)
◆ vio_legacy_set_queue_vector()
◆ vio_legacy_set_status()
◆ vio_legacy_setup_vq()
Definition at line 177 of file VirtIOPCILegacy.c.
182{
184 unsigned long ring_size, heap_size;
186
187
191 }
192
196 }
197
198
201
202
207 if (!vq) {
209 goto err_activate_queue;
210 }
211
213
215 msix_vec =
vdev->
device->set_queue_vector(vq, msix_vec);
218 goto err_assign;
219 }
220 }
221
224
225err_assign:
226err_activate_queue:
230}
static NTSTATUS vio_legacy_query_vq_alloc(VirtIODevice *vdev, unsigned index, unsigned short *pNumEntries, unsigned long *pRingSize, unsigned long *pHeapSize)
struct virtqueue * vring_new_virtqueue_split(unsigned int index, unsigned int num, unsigned int vring_align, VirtIODevice *vdev, void *pages, void(*notify)(struct virtqueue *), void *control)
#define NT_SUCCESS(StatCode)
#define STATUS_DEVICE_BUSY
#define VIRTIO_PCI_QUEUE_ADDR_SHIFT
#define mem_get_physical_address(vdev, virt)
#define mem_alloc_contiguous_pages(vdev, size)
void vp_notify(struct virtqueue *vq)
◆ virtio_pci_device_ops
Initial value:= {
}
static void vio_legacy_del_vq(VirtIOQueueInfo *info)
static void vio_legacy_set_status(VirtIODevice *vdev, u8 status)
static void vio_legacy_reset(VirtIODevice *vdev)
static void vio_legacy_get_config(VirtIODevice *vdev, unsigned offset, void *buf, unsigned len)
static u16 vio_legacy_set_queue_vector(struct virtqueue *vq, u16 vector)
static NTSTATUS vio_legacy_set_features(VirtIODevice *vdev, u64 features)
static u16 vio_legacy_set_config_vector(VirtIODevice *vdev, u16 vector)
static NTSTATUS vio_legacy_setup_vq(struct virtqueue **queue, VirtIODevice *vdev, VirtIOQueueInfo *info, unsigned index, u16 msix_vec)
static u8 vio_legacy_get_status(VirtIODevice *vdev)
static u64 vio_legacy_get_features(VirtIODevice *vdev)
static void vio_legacy_set_config(VirtIODevice *vdev, unsigned offset, const void *buf, unsigned len)
Definition at line 252 of file VirtIOPCILegacy.c.
Referenced by vio_legacy_initialize().