Given we do post processing after the share/unshare calls from guest in try_complete_pending_op and use set_ecall_result to set the ECALL results returned from the host, we end up incrementing sepc second time. First time when we call set_ecall_result from run_vcpu under EcallAction::Break case.
This skips the next instruction(s) (fp load and stack pointer adjustment instructions in case of kvm) and leads to strange issues.
Given we do post processing after the share/unshare calls from guest in
try_complete_pending_op
and useset_ecall_result
to set the ECALL results returned from the host, we end up incrementing sepc second time. First time when we callset_ecall_result
fromrun_vcpu
under EcallAction::Break case.This skips the next instruction(s) (fp load and stack pointer adjustment instructions in case of kvm) and leads to strange issues.