]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: Skip pio instruction when it is emulated, not executed
authorAvi Kivity <avi@qumranet.com>
Sun, 2 Dec 2007 11:18:45 +0000 (13:18 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 14 Dec 2007 17:50:56 +0000 (09:50 -0800)
commite86704982a2c88a3bb2d4571de928928d5f9e574
tree56ea9f37720c2e10c2a01bca27ac86d3f9e52c29
parentc5c1366253addd6691d620f18f7e660c4e11b08d
KVM: Skip pio instruction when it is emulated, not executed

patch 0967b7bf1c22b55777aba46ff616547feed0b141 in mainline.

If we defer updating rip until pio instructions are executed, we have a
problem with reset:  a pio reset updates rip, and when the instruction
completes we skip the emulated instruction, pointing rip somewhere completely
unrelated.

Fix by updating rip when we see decode the instruction, not after emulation.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/kvm/kvm_main.c