diff --git a/hypervisor/boot/guest/vboot_info.c b/hypervisor/boot/guest/vboot_info.c index abf726200..278c959d1 100644 --- a/hypervisor/boot/guest/vboot_info.c +++ b/hypervisor/boot/guest/vboot_info.c @@ -61,7 +61,7 @@ static int32_t init_vm_kernel_info(struct acrn_vm *vm, const struct abi_module * if ((mod->start != NULL) && (mod->size != 0U)) { vm->sw.kernel_info.kernel_src_addr = mod->start; vm->sw.kernel_info.kernel_size = mod->size; - if ((vm->sw.kernel_type == KERNEL_BZIMAGE) || (vm->sw.kernel_type == KERNEL_ZEPHYR)) { + if ((vm->sw.kernel_type > 0) && (vm->sw.kernel_type < KERNEL_UNKNOWN)) { ret = 0; } else { pr_err("Unsupported Kernel type."); diff --git a/hypervisor/common/vm_load.c b/hypervisor/common/vm_load.c index 78b6a3957..d9e9d8ba7 100644 --- a/hypervisor/common/vm_load.c +++ b/hypervisor/common/vm_load.c @@ -493,7 +493,7 @@ int32_t vm_sw_loader(struct acrn_vm *vm) ret = vm_bzimage_loader(vm); - } else if (vm->sw.kernel_type == KERNEL_ZEPHYR){ + } else if (vm->sw.kernel_type == KERNEL_RAWIMAGE){ ret = vm_rawimage_loader(vm); diff --git a/hypervisor/include/arch/x86/asm/vm_config.h b/hypervisor/include/arch/x86/asm/vm_config.h index 016dc0401..d3d1c2402 100644 --- a/hypervisor/include/arch/x86/asm/vm_config.h +++ b/hypervisor/include/arch/x86/asm/vm_config.h @@ -110,6 +110,9 @@ struct vuart_config { enum os_kernel_type { KERNEL_BZIMAGE = 1, KERNEL_ZEPHYR, + KERNEL_RAWIMAGE, + KERNEL_ELF, + KERNEL_UNKNOWN, }; struct acrn_vm_os_config {