gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Functions
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

#define VIRTIO_RING_F_EVENT_IDX   29

Definition at line 59 of file virtio_ring.h.

#define VIRTIO_RING_F_INDIRECT_DESC   28

Definition at line 53 of file virtio_ring.h.

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

Definition at line 130 of file virtio_ring.h.

#define VRING_AVAIL_F_NO_INTERRUPT   1

Definition at line 50 of file virtio_ring.h.

#define VRING_DESC_F_INDIRECT   4

Definition at line 41 of file virtio_ring.h.

#define VRING_DESC_F_NEXT   1

Definition at line 37 of file virtio_ring.h.

Referenced by VirtDescriptor::hasNext().

#define VRING_DESC_F_WRITE   2

Definition at line 39 of file virtio_ring.h.

Referenced by VirtDescriptor::isOutgoing().

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

Definition at line 129 of file virtio_ring.h.

#define VRING_USED_F_NO_NOTIFY   1

Definition at line 46 of file virtio_ring.h.

Function Documentation

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

Definition at line 132 of file virtio_ring.h.

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

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

Definition at line 153 of file virtio_ring.h.

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

Definition at line 142 of file virtio_ring.h.


Generated on Fri Jun 9 2017 13:03:58 for gem5 by doxygen 1.8.6