From 68aa718ca0ad8179234e41140a5d2c5ff4909631 Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Mon, 21 Jan 2019 02:56:01 +0800 Subject: [PATCH] HV: replace bootargs config with acrn_vm_os_config The member of bootargs in acrn_vm_config will be replaced by acrn_vm_os_config struct. Tracked-On: #2291 Signed-off-by: Victor Sun Acked-by: Eddie Dong --- hypervisor/boot/sbl/multiboot.c | 4 ++-- hypervisor/include/arch/x86/guest/vm.h | 1 - hypervisor/partition/apl-mrb/vm_description.c | 4 ++-- hypervisor/partition/dnv-cb2/vm_description.c | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hypervisor/boot/sbl/multiboot.c b/hypervisor/boot/sbl/multiboot.c index e7e5521d6..0e8aa14eb 100644 --- a/hypervisor/boot/sbl/multiboot.c +++ b/hypervisor/boot/sbl/multiboot.c @@ -49,8 +49,8 @@ int32_t init_vm_boot_info(struct acrn_vm *vm) vm->sw.kernel_info.kernel_src_addr = hpa2hva((uint64_t)mods[0].mm_mod_start); vm->sw.kernel_info.kernel_size = mods[0].mm_mod_end - mods[0].mm_mod_start; 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_src_addr = (void *)vm_config->os_config.bootargs; + vm->sw.linux_info.bootargs_size = strnlen_s(vm_config->os_config.bootargs, MEM_2K); 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 ebf2be3ad..91db361a2 100644 --- a/hypervisor/include/arch/x86/guest/vm.h +++ b/hypervisor/include/arch/x86/guest/vm.h @@ -217,7 +217,6 @@ struct acrn_vm_config { #ifdef CONFIG_PARTITION_MODE bool vm_vuart; - const char *bootargs; struct vpci_vdev_array *vpci_vdev_array; bool lapic_pt; #endif diff --git a/hypervisor/partition/apl-mrb/vm_description.c b/hypervisor/partition/apl-mrb/vm_description.c index 4cbabd6c8..9ec3c4233 100644 --- a/hypervisor/partition/apl-mrb/vm_description.c +++ b/hypervisor/partition/apl-mrb/vm_description.c @@ -146,7 +146,7 @@ struct vm_config_arraies vm_config_partition = { .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 \ + .os_config.bootargs = "root=/dev/sda3 rw rootwait noxsave maxcpus=2 nohpet console=hvc0 \ console=ttyS2 no_timer_check ignore_loglevel log_buf_len=16M \ consoleblank=0 tsc=reliable xapic_phys", .vpci_vdev_array = &vpci_vdev_array1, @@ -158,7 +158,7 @@ struct vm_config_arraies vm_config_partition = { .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 \ + .os_config.bootargs = "root=/dev/sda3 rw rootwait noxsave maxcpus=2 nohpet console=hvc0 \ console=ttyS2 no_timer_check ignore_loglevel log_buf_len=16M \ consoleblank=0 tsc=reliable xapic_phys", .vpci_vdev_array = &vpci_vdev_array2, diff --git a/hypervisor/partition/dnv-cb2/vm_description.c b/hypervisor/partition/dnv-cb2/vm_description.c index 17f5e8d85..efc6a9973 100644 --- a/hypervisor/partition/dnv-cb2/vm_description.c +++ b/hypervisor/partition/dnv-cb2/vm_description.c @@ -180,7 +180,7 @@ struct vm_config_arraies vm_config_partition = { .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 " \ + .os_config.bootargs = "root=/dev/sda rw rootwait noxsave maxcpus=4 nohpet console=hvc0 " \ "console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\ "consoleblank=0 tsc=reliable xapic_phys apic_debug", .vpci_vdev_array = &vpci_vdev_array1, @@ -193,7 +193,7 @@ struct vm_config_arraies vm_config_partition = { .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 "\ + .os_config.bootargs = "root=/dev/sda2 rw rootwait noxsave maxcpus=4 nohpet console=hvc0 "\ "console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M "\ "consoleblank=0 tsc=reliable xapic_phys apic_debug", .vpci_vdev_array = &vpci_vdev_array2,