refactor: boot ordered vcpu list
Refactor vm_update_boot and vm_get_first_boot to vcpu_update_boot and
vcpu_get_boot_vcpu. Moved the functions from vm to vcpu module and
adapted to use the vcpu interface functions.
Change from building a boot ordered VM list to a vCPU list.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: If29b785d76fef3a94e752705abc003acb5f3cc66
diff --git a/src/load.c b/src/load.c
index c34120d..243d95a 100644
--- a/src/load.c
+++ b/src/load.c
@@ -238,7 +238,7 @@
}
/* Updating boot list according to boot_order */
- vm_update_boot(vm_locked.vm);
+ vcpu_update_boot(vm_get_vcpu(vm_locked.vm, 0));
if (vm_locked_are_notifications_enabled(vm_locked) &&
!plat_ffa_notifications_bitmap_create_call(
@@ -388,8 +388,8 @@
dlog_info("Loaded primary VM with %u vCPUs, entry at %#x.\n",
vm->vcpu_count, pa_addr(primary_begin));
- /* Mark the primary to be the first booted VM */
- vm_update_boot(vm);
+ /* Mark the first VM vCPU to be the first booted vCPU. */
+ vcpu_update_boot(vm_get_vcpu(vm, 0));
vcpu_locked = vcpu_lock(vm_get_vcpu(vm, 0));
vcpu_on(vcpu_locked, primary_entry, params->kernel_arg);