mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
HV: hypercall: make hypercall functions return int32_t
The error code in the hypervisor is 32-bit signed integers. To reduce implicit conversions, this patch make hcall_xxx returns int32_t, and finally converts it to uint64_t when assigned to rax whose semantics is properly defined in C99. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
/* this hcall is only come from trusty enabled vcpu itself, and cannot be
|
||||
* called from other vcpus
|
||||
*/
|
||||
int64_t hcall_world_switch(struct vcpu *vcpu)
|
||||
int32_t hcall_world_switch(struct vcpu *vcpu)
|
||||
{
|
||||
int32_t next_world_id = !(vcpu->arch_vcpu.cur_context);
|
||||
|
||||
@@ -37,7 +37,7 @@ int64_t hcall_world_switch(struct vcpu *vcpu)
|
||||
/* this hcall is only come from trusty enabled vcpu itself, and cannot be
|
||||
* called from other vcpus
|
||||
*/
|
||||
int64_t hcall_initialize_trusty(struct vcpu *vcpu, uint64_t param)
|
||||
int32_t hcall_initialize_trusty(struct vcpu *vcpu, uint64_t param)
|
||||
{
|
||||
if (!vcpu->vm->sworld_control.sworld_enabled) {
|
||||
pr_err("%s, Secure World is not enabled!\n", __func__);
|
||||
|
||||
Reference in New Issue
Block a user