]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86: Delay skip of emulated hypercall instruction
authorMarian Rotariu <mrotariu@bitdefender.com>
Mon, 30 Apr 2018 09:23:01 +0000 (12:23 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:56:46 +0000 (14:56 +0200)
commitba30a6dfa3f512d53ea61416ce06e65dd95d2c30
treea52acedb110728f64c7aa7099e94f8f06937dd29
parentf3133d65277222591c478475302b1e340fb14bc5
x86: Delay skip of emulated hypercall instruction

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 6356ee0c9602004e0a3b4b2dad68ee2ee9385b17 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kvm/hyperv.c
arch/x86/kvm/x86.c