]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Clear rflags.rf on emulated instructions
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 21 Jul 2014 11:37:29 +0000 (14:37 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Jul 2014 11:42:21 +0000 (13:42 +0200)
commit6681692dce2db26c55114d9004e1d98eb97b8e18
tree05b79ab580777565c3433752372cc51ead3af8f5
parent4f336b79af15346ddfc480547263d0467f695277
KVM: x86: Clear rflags.rf on emulated instructions

When an instruction is emulated RFLAGS.RF should be cleared. KVM previously did
not do so. This patch clears RFLAGS.RF after interception is done.  If a fault
occurs during the instruction, RFLAGS.RF will be set by a previous patch.  This
patch does not handle the case of traps/interrupts during rep-strings. Traps
are only expected to occur on debug watchpoints, and those are anyhow not
handled by the emulator.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c