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:
Junjie Mao
2018-07-19 23:17:38 +08:00
committed by lijinxia
parent ad73bb511c
commit 1a1ee93656
4 changed files with 69 additions and 66 deletions

View File

@@ -14,7 +14,7 @@
*/
int vmcall_vmexit_handler(struct vcpu *vcpu)
{
int64_t ret = -EACCES;
int32_t ret = -EACCES;
struct vm *vm = vcpu->vm;
struct run_context *cur_context =
&vcpu->arch_vcpu.contexts[vcpu->arch_vcpu.cur_context];