acrn-hypervisor/misc/sample_application/rtvm/ivshmemlib.h
Matthew Leon d8f55c7bca sample app: initial import of the sample app
This sample application allows the user to get the hypervisor and a simple Virtual Machine Scenario to run
This sample application assumes the user is following the sample app guide in the acrn hypervisor documentation

Tracked-On: #7820
Signed-off-by: Matthew Leon <matthew.leon@intel.com>
2022-07-20 09:36:03 +08:00

24 lines
484 B
C

/*
* Copyright (C) 2022 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
//The size of the shared memory region
#define REGION_SIZE 32768
enum return_vals {success = 0, failure = -1};
int setup_ivshmem_region(const char*);
int close_ivshmem_region(void);
size_t read_ivshmem_region(char *, size_t);
size_t write_ivshmem_region(char *, size_t);