diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index 40a60e08d..2bc712df1 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -174,7 +174,7 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_ &vm_config->GUID[0], sizeof(vm_config->GUID)); #ifdef CONFIG_PARTITION_MODE ept_mr_add(vm, (uint64_t *)vm->arch_vm.nworld_eptp, - vm_config->start_hpa, 0UL, vm_config->mem_size, + vm_config->memory.start_hpa, 0UL, vm_config->memory.size, EPT_RWX|EPT_WB); init_vm_boot_info(vm); #endif diff --git a/hypervisor/boot/sbl/multiboot.c b/hypervisor/boot/sbl/multiboot.c index df44ab042..e7e5521d6 100644 --- a/hypervisor/boot/sbl/multiboot.c +++ b/hypervisor/boot/sbl/multiboot.c @@ -51,7 +51,7 @@ int32_t init_vm_boot_info(struct acrn_vm *vm) vm->sw.kernel_info.kernel_load_addr = (void *)(16 * 1024 * 1024UL); vm->sw.linux_info.bootargs_src_addr = (void *)vm_config->bootargs; vm->sw.linux_info.bootargs_size = strnlen_s(vm_config->bootargs, MEM_2K); - vm->sw.linux_info.bootargs_load_addr = (void *)(vm_config->mem_size - 8*1024UL); + vm->sw.linux_info.bootargs_load_addr = (void *)(vm_config->memory.size - 8*1024UL); clac(); ret = 0; } diff --git a/hypervisor/include/arch/x86/guest/vm.h b/hypervisor/include/arch/x86/guest/vm.h index 96c1a7a88..ebf2be3ad 100644 --- a/hypervisor/include/arch/x86/guest/vm.h +++ b/hypervisor/include/arch/x86/guest/vm.h @@ -216,8 +216,6 @@ struct acrn_vm_config { struct acrn_vm_os_config os_config; /* OS information the VM */ #ifdef CONFIG_PARTITION_MODE - uint64_t start_hpa; - uint64_t mem_size; /* UOS memory size in hex */ bool vm_vuart; const char *bootargs; struct vpci_vdev_array *vpci_vdev_array; diff --git a/hypervisor/partition/apl-mrb/vm_description.c b/hypervisor/partition/apl-mrb/vm_description.c index 226b65579..4cbabd6c8 100644 --- a/hypervisor/partition/apl-mrb/vm_description.c +++ b/hypervisor/partition/apl-mrb/vm_description.c @@ -143,8 +143,8 @@ struct vm_config_arraies vm_config_partition = { { .type = PRE_LAUNCHED_VM, .pcpu_bitmap = (PLUG_CPU(0) | PLUG_CPU(2)), - .start_hpa = 0x100000000UL, - .mem_size = 0x20000000UL, /* uses contiguous memory from host */ + .memory.start_hpa = 0x100000000UL, + .memory.size = 0x20000000UL, /* uses contiguous memory from host */ .vm_vuart = true, .bootargs = "root=/dev/sda3 rw rootwait noxsave maxcpus=2 nohpet console=hvc0 \ console=ttyS2 no_timer_check ignore_loglevel log_buf_len=16M \ @@ -155,8 +155,8 @@ struct vm_config_arraies vm_config_partition = { { .type = PRE_LAUNCHED_VM, .pcpu_bitmap = (PLUG_CPU(1) | PLUG_CPU(3)), - .start_hpa = 0x120000000UL, - .mem_size = 0x20000000UL, /* uses contiguous memory from host */ + .memory.start_hpa = 0x120000000UL, + .memory.size = 0x20000000UL, /* uses contiguous memory from host */ .vm_vuart = true, .bootargs = "root=/dev/sda3 rw rootwait noxsave maxcpus=2 nohpet console=hvc0 \ console=ttyS2 no_timer_check ignore_loglevel log_buf_len=16M \ diff --git a/hypervisor/partition/dnv-cb2/vm_description.c b/hypervisor/partition/dnv-cb2/vm_description.c index 82471ff32..17f5e8d85 100644 --- a/hypervisor/partition/dnv-cb2/vm_description.c +++ b/hypervisor/partition/dnv-cb2/vm_description.c @@ -177,8 +177,8 @@ struct vm_config_arraies vm_config_partition = { { .type = PRE_LAUNCHED_VM, .pcpu_bitmap = (PLUG_CPU(0) | PLUG_CPU(2) | PLUG_CPU(4) | PLUG_CPU(6)), - .start_hpa = 0x100000000UL, - .mem_size = 0x80000000UL, /* uses contiguous memory from host */ + .memory.start_hpa = 0x100000000UL, + .memory.size = 0x80000000UL, /* uses contiguous memory from host */ .vm_vuart = true, .bootargs = "root=/dev/sda rw rootwait noxsave maxcpus=4 nohpet console=hvc0 " \ "console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\ @@ -190,8 +190,8 @@ struct vm_config_arraies vm_config_partition = { { .type = PRE_LAUNCHED_VM, .pcpu_bitmap = (PLUG_CPU(1) | PLUG_CPU(3) | PLUG_CPU(5) | PLUG_CPU(7)), - .start_hpa = 0x180000000UL, - .mem_size = 0x80000000UL, /* uses contiguous memory from host */ + .memory.start_hpa = 0x180000000UL, + .memory.size = 0x80000000UL, /* uses contiguous memory from host */ .vm_vuart = true, .bootargs = "root=/dev/sda2 rw rootwait noxsave maxcpus=4 nohpet console=hvc0 "\ "console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\