SPCI: SPCI_YIELD.
Adapted hf_vcpu_yield to conform with the spci_yield specification.
Change-Id: I7ad11e83f068a09a19fd930dcead787b5a22e498
diff --git a/inc/hf/api.h b/inc/hf/api.h
index c63f95c..75a85e2 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -40,7 +40,6 @@
struct vcpu *api_preempt(struct vcpu *current);
struct vcpu *api_wait_for_interrupt(struct vcpu *current);
-struct vcpu *api_yield(struct vcpu *current);
struct vcpu *api_abort(struct vcpu *current);
int64_t api_interrupt_enable(uint32_t intid, bool enable, struct vcpu *current);
@@ -53,3 +52,4 @@
struct vcpu **next);
int32_t api_spci_msg_recv(uint32_t attributes, struct vcpu *current,
struct vcpu **next);
+int32_t api_spci_yield(struct vcpu *current, struct vcpu **next);
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index 6d36d54..aaa2fa7 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -28,7 +28,6 @@
#define HF_VM_GET_COUNT 0xff01
#define HF_VCPU_GET_COUNT 0xff02
#define HF_VCPU_RUN 0xff03
-#define HF_VCPU_YIELD 0xff04
#define HF_VM_CONFIGURE 0xff05
#define HF_MAILBOX_CLEAR 0xff08
#define HF_MAILBOX_WRITABLE_GET 0xff09
@@ -84,10 +83,11 @@
/**
* Hints that the vcpu is willing to yield its current use of the physical CPU.
+ * This call always returns SPCI_SUCCESS.
*/
-static inline void hf_vcpu_yield(void)
+static inline int64_t spci_yield(void)
{
- hf_call(HF_VCPU_YIELD, 0, 0, 0);
+ return hf_call(SPCI_YIELD_32, 0, 0, 0);
}
/**