Skip to content

Commit 4cd27a5

Browse files
KaigeFulijinxia
authored andcommitted
HV: Don't pass retval to vmm_emulate_instruction()
We pass retval to vmm_emulate_instruction and assign the return value to retval at the same time. The retval will be passed to mmio_read/write finally as memarg and the functions don't use the parameter actually. Apparently, we misused the retval. This patch fix it by passing 'NULL' to vmm_emulate_instruction. Signed-off-by: Kaige Fu <kaige.fu@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
1 parent 05d2558 commit 4cd27a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hypervisor/arch/x86/guest/instr_emul_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ int emulate_instruction(struct vcpu *vcpu)
336336
paging = &emul_cnx->paging;
337337

338338
retval = vmm_emulate_instruction(vcpu, gpa,
339-
&emul_cnx->vie, paging, mread, mwrite, &retval);
339+
&emul_cnx->vie, paging, mread, mwrite, NULL);
340340

341341
return retval;
342342
}

0 commit comments

Comments
 (0)