Call spci_run directly in tests rather than hf_vcpu_run.
Bug: 141469322
Change-Id: I4eb7f71c60772011d500704663b31cb725105b41
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index dd39c26..90397c4 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -60,15 +60,24 @@
}
/**
- * Runs the given vcpu of the given vm.
+ * Runs the given vCPU of the given VM.
+ */
+static inline struct spci_value spci_run(spci_vm_id_t vm_id,
+ spci_vcpu_index_t vcpu_idx)
+{
+ return spci_call((struct spci_value){.func = SPCI_RUN_32,
+ (uint32_t)vm_id << 16 | vcpu_idx});
+}
+
+/**
+ * Runs the given vCPU of the given VM.
*
* Returns an hf_vcpu_run_return struct telling the scheduler what to do next.
*/
static inline struct hf_vcpu_run_return hf_vcpu_run(spci_vm_id_t vm_id,
spci_vcpu_index_t vcpu_idx)
{
- return hf_vcpu_run_return_decode(spci_call((struct spci_value){
- .func = SPCI_RUN_32, (uint32_t)vm_id << 16 | vcpu_idx}));
+ return hf_vcpu_run_return_decode(spci_run(vm_id, vcpu_idx));
}
/**