gem5 v24.0.0.0
Loading...
Searching...
No Matches
virtio_ring.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

struct  vring_desc
 
struct  vring_avail
 
struct  vring_used_elem
 
struct  vring_used
 
struct  vring
 

Macros

#define VRING_DESC_F_NEXT   1
 
#define VRING_DESC_F_WRITE   2
 
#define VRING_DESC_F_INDIRECT   4
 
#define VRING_USED_F_NO_NOTIFY   1
 
#define VRING_AVAIL_F_NO_INTERRUPT   1
 
#define VIRTIO_RING_F_INDIRECT_DESC   28
 
#define VIRTIO_RING_F_EVENT_IDX   29
 
#define vring_used_event(vr)   ((vr)->avail->ring[(vr)->num])
 
#define vring_avail_event(vr)   (*(uint16_t *)&(vr)->used->ring[(vr)->num])
 

Functions

static void vring_init (struct vring *vr, unsigned int num, void *p, unsigned long align)
 
static unsigned vring_size (unsigned int num, unsigned long align)
 
static int vring_need_event (uint16_t event_idx, uint16_t new_idx, uint16_t old)
 

Macro Definition Documentation

◆ VIRTIO_RING_F_EVENT_IDX

#define VIRTIO_RING_F_EVENT_IDX   29

Definition at line 59 of file virtio_ring.h.

◆ VIRTIO_RING_F_INDIRECT_DESC

#define VIRTIO_RING_F_INDIRECT_DESC   28

Definition at line 53 of file virtio_ring.h.

◆ vring_avail_event

#define vring_avail_event ( vr)    (*(uint16_t *)&(vr)->used->ring[(vr)->num])

Definition at line 135 of file virtio_ring.h.

◆ VRING_AVAIL_F_NO_INTERRUPT

#define VRING_AVAIL_F_NO_INTERRUPT   1

Definition at line 50 of file virtio_ring.h.

◆ VRING_DESC_F_INDIRECT

#define VRING_DESC_F_INDIRECT   4

Definition at line 41 of file virtio_ring.h.

◆ VRING_DESC_F_NEXT

#define VRING_DESC_F_NEXT   1

Definition at line 37 of file virtio_ring.h.

Referenced by gem5::VirtDescriptor::hasNext().

◆ VRING_DESC_F_WRITE

#define VRING_DESC_F_WRITE   2

Definition at line 39 of file virtio_ring.h.

Referenced by gem5::VirtDescriptor::isOutgoing().

◆ vring_used_event

#define vring_used_event ( vr)    ((vr)->avail->ring[(vr)->num])

Definition at line 134 of file virtio_ring.h.

◆ VRING_USED_F_NO_NOTIFY

#define VRING_USED_F_NO_NOTIFY   1

Definition at line 46 of file virtio_ring.h.

Function Documentation

◆ vring_init()

static void vring_init ( struct vring * vr,
unsigned int num,
void * p,
unsigned long align )
inlinestatic

Definition at line 137 of file virtio_ring.h.

References vring::avail, vring::desc, vring::num, vring_avail::ring, and vring::used.

◆ vring_need_event()

static int vring_need_event ( uint16_t event_idx,
uint16_t new_idx,
uint16_t old )
inlinestatic

Definition at line 158 of file virtio_ring.h.

◆ vring_size()

static unsigned vring_size ( unsigned int num,
unsigned long align )
inlinestatic

Definition at line 147 of file virtio_ring.h.


Generated on Tue Jun 18 2024 16:24:08 for gem5 by doxygen 1.11.0