feat: adapt vcpu operational mode to interpret newly added states
With a set of newly introduced states for a vCPU to allow fine grain
tracking of lifecycle of a partition, we have to slightly extend the
notion of a vCPU being ON and OFF.
This patch adds necessary support and refactors helpers to interpret
if a vCPU is in ON or OFF from a operational mode perspective. For
example, VCPU_STATE_STARTING is also considered as OFF since partition
manager has not yet scheduled the vCPU on a physical CPU.
Change-Id: I03aeca4ecb83c28e6cb7897ad0e2a51b315e16b0
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/src/load.c b/src/load.c
index d782904..219c99b 100644
--- a/src/load.c
+++ b/src/load.c
@@ -417,7 +417,7 @@
vm_update_boot(vm);
vcpu_locked = vcpu_lock(vm_get_vcpu(vm, 0));
- vcpu_on(vcpu_locked, primary_entry, params->kernel_arg);
+ vcpu_prepare(vcpu_locked, primary_entry, params->kernel_arg);
vcpu_unlock(&vcpu_locked);
ret = true;