OSDN Git Service

x86: Delay skip of emulated hypercall instruction
authorMarian Rotariu <mrotariu@bitdefender.com>
Mon, 30 Apr 2018 09:23:01 +0000 (12:23 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 May 2018 09:21:10 +0000 (11:21 +0200)
commit6356ee0c9602004e0a3b4b2dad68ee2ee9385b17
tree0b5978c4e855c52181e1a2004e95d87558794e79
parentddc9cfb79c1096a0855839631c091aa7e9602052
x86: Delay skip of emulated hypercall instruction

The IP increment should be done after the hypercall emulation, after
calling the various handlers. In this way, these handlers can accurately
identify the the IP of the VMCALL if they need it.

This patch keeps the same functionality for the Hyper-V handler which does
not use the return code of the standard kvm_skip_emulated_instruction()
call.

Signed-off-by: Marian Rotariu <mrotariu@bitdefender.com>
[Hyper-V hypercalls also need kvm_skip_emulated_instruction() - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c
arch/x86/kvm/x86.c