mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-07-12 20:54:19 +00:00
Ivshmem device is used for shared memory based communication between
pre-launched/post-launched VMs.
this patch implements ivshmem device configuration space initialization
and ivshmem device operation methods.
v2: introduce init_one_pcibar interface to simplify BAR initialization
operation of HV emulated PCI device.
v3: 1) due to init_one_pcibar API is only used for pre-launched VM vdevs
it can't be applied to all vdevs, so remove it.
2) move ivshmem BARs initialization to subsequent patch, this patch
only introduce ivshmem configuration space initialization.
Tracked-On: #4853
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
31 lines
566 B
C
31 lines
566 B
C
/*
|
|
* Copyright (C) 2020 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef IVSHMEM_H
|
|
#define IVSHMEM_H
|
|
|
|
#ifdef CONFIG_IVSHMEM_ENABLED
|
|
struct ivshmem_shm_region {
|
|
char name[32];
|
|
uint64_t hpa;
|
|
uint64_t size;
|
|
};
|
|
|
|
extern const struct pci_vdev_ops vpci_ivshmem_ops;
|
|
|
|
/**
|
|
* @brief Initialize ivshmem shared memory regions
|
|
*
|
|
* Initialize ivshmem shared memory regions based on user configuration.
|
|
*
|
|
* @return None
|
|
*/
|
|
void init_ivshmem_shared_memory(void);
|
|
|
|
#endif /* CONFIG_IVSHMEM_ENABLED */
|
|
|
|
#endif /* IVSHMEM_H */
|