mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-06 07:26:56 +00:00
acrn-config: move source code of IVSHMEM region name to ivshmem_cfg.h
move MACRO of IVSHMEM region name to ivshmem_cfg.h and bug fix that avoids multiple declarations of mem_regions in ivshmem_cfg.h Tracked-On: #4853 Signed-off-by: Shuang Zheng <shuang.zheng@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
4617762419
commit
f838dbaaf9
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
#include <ivshmem.h>
|
#include <ivshmem.h>
|
||||||
#include <pgtable.h>
|
#include <pgtable.h>
|
||||||
#include <pci_devices.h>
|
|
||||||
|
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
|
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
|
||||||
@ -18,12 +19,10 @@
|
|||||||
#define IVSHMEM_DEV_NUM 2UL
|
#define IVSHMEM_DEV_NUM 2UL
|
||||||
|
|
||||||
/* All user defined memory regions */
|
/* All user defined memory regions */
|
||||||
|
#define IVSHMEM_SHM_REGIONS \
|
||||||
struct ivshmem_shm_region mem_regions[] = {
|
{ \
|
||||||
{
|
.name = IVSHMEM_SHM_REGION_0, \
|
||||||
.name = IVSHMEM_SHM_REGION_0,
|
.size = 0x200000UL, /* 2M */ \
|
||||||
.size = 0x200000UL, /* 2M */
|
|
||||||
},
|
},
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* IVSHMEM_CFG_H */
|
#endif /* IVSHMEM_CFG_H */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <vbar_base.h>
|
#include <vbar_base.h>
|
||||||
#include <mmu.h>
|
#include <mmu.h>
|
||||||
#include <page.h>
|
#include <page.h>
|
||||||
#include <ivshmem.h>
|
#include <ivshmem_cfg.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for
|
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
GUEST_FLAG_RT | GUEST_FLAG_IO_COMPLETION_POLLING)
|
GUEST_FLAG_RT | GUEST_FLAG_IO_COMPLETION_POLLING)
|
||||||
|
|
||||||
#define VM0_CONFIG_MEM_START_HPA 0x100000000UL
|
#define VM0_CONFIG_MEM_START_HPA 0x100000000UL
|
||||||
#define VM0_CONFIG_MEM_SIZE 0x40000000UL
|
#define VM0_CONFIG_MEM_SIZE 0xC0000000UL
|
||||||
#define VM0_CONFIG_MEM_START_HPA2 0x0UL
|
#define VM0_CONFIG_MEM_START_HPA2 0x0UL
|
||||||
#define VM0_CONFIG_MEM_SIZE_HPA2 0x0UL
|
#define VM0_CONFIG_MEM_SIZE_HPA2 0x0UL
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
#include <ivshmem.h>
|
#include <ivshmem.h>
|
||||||
#include <pgtable.h>
|
#include <pgtable.h>
|
||||||
#include <pci_devices.h>
|
|
||||||
|
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
|
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
|
||||||
@ -18,11 +19,10 @@
|
|||||||
#define IVSHMEM_DEV_NUM 2UL
|
#define IVSHMEM_DEV_NUM 2UL
|
||||||
|
|
||||||
/* All user defined memory regions */
|
/* All user defined memory regions */
|
||||||
|
|
||||||
#define IVSHMEM_SHM_REGIONS \
|
#define IVSHMEM_SHM_REGIONS \
|
||||||
{ \
|
{ \
|
||||||
.name = IVSHMEM_SHM_REGION_0,\
|
.name = IVSHMEM_SHM_REGION_0, \
|
||||||
.size = 0x200000UL, /* 2MB */\
|
.size = 0x200000UL, /* 2M */ \
|
||||||
},
|
},
|
||||||
|
|
||||||
#endif /* IVSHMEM_CFG_H */
|
#endif /* IVSHMEM_CFG_H */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <vbar_base.h>
|
#include <vbar_base.h>
|
||||||
#include <mmu.h>
|
#include <mmu.h>
|
||||||
#include <page.h>
|
#include <page.h>
|
||||||
#include <ivshmem.h>
|
#include <ivshmem_cfg.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for
|
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
#include <ivshmem.h>
|
#include <ivshmem.h>
|
||||||
#include <pgtable.h>
|
#include <pgtable.h>
|
||||||
#include <pci_devices.h>
|
|
||||||
|
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
|
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
|
||||||
@ -18,12 +19,10 @@
|
|||||||
#define IVSHMEM_DEV_NUM 2UL
|
#define IVSHMEM_DEV_NUM 2UL
|
||||||
|
|
||||||
/* All user defined memory regions */
|
/* All user defined memory regions */
|
||||||
|
#define IVSHMEM_SHM_REGIONS \
|
||||||
struct ivshmem_shm_region mem_regions[] = {
|
{ \
|
||||||
{
|
.name = IVSHMEM_SHM_REGION_0, \
|
||||||
.name = IVSHMEM_SHM_REGION_0,
|
.size = 0x200000UL, /* 2M */ \
|
||||||
.size = 0x200000UL, /* 2M */
|
|
||||||
},
|
},
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* IVSHMEM_CFG_H */
|
#endif /* IVSHMEM_CFG_H */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <vbar_base.h>
|
#include <vbar_base.h>
|
||||||
#include <mmu.h>
|
#include <mmu.h>
|
||||||
#include <page.h>
|
#include <page.h>
|
||||||
#include <ivshmem.h>
|
#include <ivshmem_cfg.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for
|
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for
|
||||||
|
@ -78,4 +78,83 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
|||||||
.t_vuart.vuart_id = 1U,
|
.t_vuart.vuart_id = 1U,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ /* VM3 */
|
||||||
|
CONFIG_POST_STD_VM(2),
|
||||||
|
#ifdef CONFIG_RDT_ENABLED
|
||||||
|
.clos = VM3_VCPU_CLOS,
|
||||||
|
#endif
|
||||||
|
.cpu_affinity = VM3_CONFIG_CPU_AFFINITY,
|
||||||
|
.vuart[0] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = COM1_BASE,
|
||||||
|
.irq = COM1_IRQ,
|
||||||
|
},
|
||||||
|
.vuart[1] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = INVALID_COM_BASE,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ /* VM4 */
|
||||||
|
CONFIG_POST_STD_VM(3),
|
||||||
|
#ifdef CONFIG_RDT_ENABLED
|
||||||
|
.clos = VM4_VCPU_CLOS,
|
||||||
|
#endif
|
||||||
|
.cpu_affinity = VM4_CONFIG_CPU_AFFINITY,
|
||||||
|
.vuart[0] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = COM1_BASE,
|
||||||
|
.irq = COM1_IRQ,
|
||||||
|
},
|
||||||
|
.vuart[1] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = INVALID_COM_BASE,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ /* VM5 */
|
||||||
|
CONFIG_POST_STD_VM(4),
|
||||||
|
#ifdef CONFIG_RDT_ENABLED
|
||||||
|
.clos = VM5_VCPU_CLOS,
|
||||||
|
#endif
|
||||||
|
.cpu_affinity = VM5_CONFIG_CPU_AFFINITY,
|
||||||
|
.vuart[0] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = COM1_BASE,
|
||||||
|
.irq = COM1_IRQ,
|
||||||
|
},
|
||||||
|
.vuart[1] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = INVALID_COM_BASE,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ /* VM6 */
|
||||||
|
CONFIG_POST_STD_VM(5),
|
||||||
|
#ifdef CONFIG_RDT_ENABLED
|
||||||
|
.clos = VM6_VCPU_CLOS,
|
||||||
|
#endif
|
||||||
|
.cpu_affinity = VM6_CONFIG_CPU_AFFINITY,
|
||||||
|
.vuart[0] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = COM1_BASE,
|
||||||
|
.irq = COM1_IRQ,
|
||||||
|
},
|
||||||
|
.vuart[1] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = INVALID_COM_BASE,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ /* VM7 */
|
||||||
|
CONFIG_KATA_VM(1),
|
||||||
|
#ifdef CONFIG_RDT_ENABLED
|
||||||
|
.clos = VM7_VCPU_CLOS,
|
||||||
|
#endif
|
||||||
|
.cpu_affinity = VM7_CONFIG_CPU_AFFINITY,
|
||||||
|
.vuart[0] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = INVALID_COM_BASE,
|
||||||
|
},
|
||||||
|
.vuart[1] = {
|
||||||
|
.type = VUART_LEGACY_PIO,
|
||||||
|
.addr.port_base = INVALID_COM_BASE,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
#define PRE_VM_NUM 0U
|
#define PRE_VM_NUM 0U
|
||||||
#define SOS_VM_NUM 1U
|
#define SOS_VM_NUM 1U
|
||||||
#define MAX_POST_VM_NUM 2U
|
#define MAX_POST_VM_NUM 7U
|
||||||
#define CONFIG_MAX_KATA_VM_NUM 0U
|
#define CONFIG_MAX_KATA_VM_NUM 1U
|
||||||
|
|
||||||
/* Bits mask of guest flags that can be programmed by device model. Other bits are set by hypervisor only */
|
/* Bits mask of guest flags that can be programmed by device model. Other bits are set by hypervisor only */
|
||||||
#define DM_OWNED_GUEST_FLAG_MASK (GUEST_FLAG_SECURE_WORLD_ENABLED | GUEST_FLAG_LAPIC_PASSTHROUGH | \
|
#define DM_OWNED_GUEST_FLAG_MASK (GUEST_FLAG_SECURE_WORLD_ENABLED | GUEST_FLAG_LAPIC_PASSTHROUGH | \
|
||||||
|
Loading…
Reference in New Issue
Block a user