[common] linux: added helpers for ivshmem DMA usage

This commit is contained in:
Geoffrey McRae
2020-10-29 22:56:39 +11:00
parent 0efe7dc63c
commit 5522e93fb9
2 changed files with 41 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#pragma once
#include <stdbool.h>
#include <stdint.h>
struct IVSHMEM
{
@@ -36,3 +37,7 @@ bool ivshmemOpen(struct IVSHMEM * dev);
bool ivshmemOpenDev(struct IVSHMEM * dev, const char * shmDev);
void ivshmemClose(struct IVSHMEM * dev);
void ivshmemFree(struct IVSHMEM * dev);
/* Linux KVMFR support only for now (VM->VM) */
bool ivshmemHasDMA (struct IVSHMEM * dev);
int ivshmemGetDMABuf(struct IVSHMEM * dev, uint64_t offset, uint64_t size);