hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs
[qemu.git] / hw / rdma / vmw / pvrdma_dev_ring.h
1 /*
2 * QEMU VMWARE paravirtual RDMA ring utilities
3 *
4 * Copyright (C) 2018 Oracle
5 * Copyright (C) 2018 Red Hat Inc
6 *
7 * Authors:
8 * Yuval Shaia <yuval.shaia@oracle.com>
9 * Marcel Apfelbaum <marcel@redhat.com>
10 *
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
13 *
14 */
15
16 #ifndef PVRDMA_DEV_RING_H
17 #define PVRDMA_DEV_RING_H
18
19
20 #define MAX_RING_NAME_SZ 32
21
22 typedef struct PvrdmaRing {
23 char name[MAX_RING_NAME_SZ];
24 PCIDevice *dev;
25 uint32_t max_elems;
26 size_t elem_sz;
27 struct pvrdma_ring *ring_state; /* used only for unmap */
28 int npages;
29 void **pages;
30 } PvrdmaRing;
31
32 int pvrdma_ring_init(PvrdmaRing *ring, const char *name, PCIDevice *dev,
33 struct pvrdma_ring *ring_state, uint32_t max_elems,
34 size_t elem_sz, dma_addr_t *tbl, uint32_t npages);
35 void *pvrdma_ring_next_elem_read(PvrdmaRing *ring);
36 void pvrdma_ring_read_inc(PvrdmaRing *ring);
37 void *pvrdma_ring_next_elem_write(PvrdmaRing *ring);
38 void pvrdma_ring_write_inc(PvrdmaRing *ring);
39 void pvrdma_ring_free(PvrdmaRing *ring);
40
41 #endif