refactor: boot protocol
Set the default vCPU runtime model to RTM_SP_INIT from vcpu_init
function rather than vcpu_reset.
Remove the impdef is_bootstrapped and initialized flags from vCPU and VM
contexts. Rely on the RTM_SP_INIT state to reflect that a vCPU is
initializing rather than using the mentioned flags.
Similarly, revisit the SP boot loop to consume the vCPU state.
Add an SPMC initialized flag hinting that VM's first vCPU contexts are
booted and the SPMC is initialized. This information is no longer stored
individually within VM contexts.
Revisit conditions for FFA_MSG_WAIT, FFA_SECONDARY_EP_REGISTER,
FFA_MEM_PERM_SET/GET to rely on the vCPU RTM_SP_INIT state.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I5af3b41b1f9d1121792636a37c2525d4bf22af2b
diff --git a/src/vm.c b/src/vm.c
index e4a4252..2b4a3a7 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1007,7 +1007,7 @@
*/
void vm_set_boot_info_gp_reg(struct vm *vm, struct vcpu *vcpu)
{
- if (!vm->initialized && vm->boot_info.blob_addr.ipa != 0U) {
+ if (vm->boot_info.blob_addr.ipa != 0U) {
arch_regs_set_gp_reg(&vcpu->regs,
ipa_addr(vm->boot_info.blob_addr),
vm->boot_info.gp_register_num);