mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: remove vm_description_array
When we create an UOS, we didn't indicate the vmid. Thus we can't get the vm description for the vm description array. Instead we use a temporary vm description to save data to fill the vm structure when crate an UOS. It's uselesss once UOS has created. So we don't need to maintain vm description array here for UOS. Signed-off-by: Li, Fei1 <fei1.li@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
@@ -46,12 +46,9 @@
|
||||
/**********************************/
|
||||
/* EXTERNAL VARIABLES */
|
||||
/**********************************/
|
||||
extern struct vm_description vm0_desc;
|
||||
|
||||
/* BSP Interfaces */
|
||||
void init_bsp(void);
|
||||
|
||||
/* External Interfaces */
|
||||
struct _vm_description_array;
|
||||
const struct _vm_description_array *get_vm_desc_base(void);
|
||||
void init_bsp(void);
|
||||
|
||||
#endif /* BSP_EXTERN_H */
|
||||
|
@@ -30,32 +30,16 @@
|
||||
|
||||
#include <hypervisor.h>
|
||||
|
||||
#define NUM_USER_VMS 2
|
||||
|
||||
/* Number of CPUs in VM0 */
|
||||
#define VM0_NUM_CPUS 1
|
||||
|
||||
/* Logical CPU IDs assigned to VM0 */
|
||||
int VM0_CPUS[VM0_NUM_CPUS] = {0};
|
||||
|
||||
const struct vm_description_array vm_desc = {
|
||||
/* Number of user virtual machines */
|
||||
.num_vm_desc = NUM_USER_VMS,
|
||||
|
||||
/* Virtual Machine descriptions */
|
||||
.vm_desc_array = {
|
||||
{
|
||||
/* Internal variable, MUSTBE init to -1 */
|
||||
.vm_attr_name = "vm_0",
|
||||
.vm_hw_num_cores = VM0_NUM_CPUS,
|
||||
.vm_hw_logical_core_ids = &VM0_CPUS[0],
|
||||
.vm_state_info_privilege = VM_PRIVILEGE_LEVEL_HIGH,
|
||||
.vm_created = false,
|
||||
},
|
||||
}
|
||||
struct vm_description vm0_desc = {
|
||||
.vm_attr_name = "vm_0",
|
||||
.vm_hw_num_cores = VM0_NUM_CPUS,
|
||||
.vm_hw_logical_core_ids = &VM0_CPUS[0],
|
||||
.vm_state_info_privilege = VM_PRIVILEGE_LEVEL_HIGH,
|
||||
.vm_created = false,
|
||||
};
|
||||
|
||||
const struct vm_description_array *get_vm_desc_base(void)
|
||||
{
|
||||
return &vm_desc;
|
||||
}
|
||||
|
@@ -30,31 +30,16 @@
|
||||
|
||||
#include <hypervisor.h>
|
||||
|
||||
#define NUM_USER_VMS 2
|
||||
|
||||
/* Number of CPUs in VM0 */
|
||||
#define VM0_NUM_CPUS 1
|
||||
|
||||
/* Logical CPU IDs assigned to VM0 */
|
||||
int VM0_CPUS[VM0_NUM_CPUS] = {0};
|
||||
|
||||
const struct vm_description_array vm_desc = {
|
||||
/* Number of user virtual machines */
|
||||
.num_vm_desc = NUM_USER_VMS,
|
||||
|
||||
/* Virtual Machine descriptions */
|
||||
.vm_desc_array = {
|
||||
{
|
||||
.vm_attr_name = "vm_0",
|
||||
.vm_hw_num_cores = VM0_NUM_CPUS,
|
||||
.vm_hw_logical_core_ids = &VM0_CPUS[0],
|
||||
.vm_state_info_privilege = VM_PRIVILEGE_LEVEL_HIGH,
|
||||
.vm_created = false,
|
||||
},
|
||||
}
|
||||
struct vm_description vm0_desc = {
|
||||
.vm_attr_name = "vm_0",
|
||||
.vm_hw_num_cores = VM0_NUM_CPUS,
|
||||
.vm_hw_logical_core_ids = &VM0_CPUS[0],
|
||||
.vm_state_info_privilege = VM_PRIVILEGE_LEVEL_HIGH,
|
||||
.vm_created = false,
|
||||
};
|
||||
|
||||
const struct vm_description_array *get_vm_desc_base(void)
|
||||
{
|
||||
return &vm_desc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user