KVM: x86: Setting rflags.rf during rep-string emulation
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 24 Jul 2014 11:51:23 +0000 (14:51 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jul 2014 12:03:54 +0000 (14:03 +0200)
commitb9a1ecb909e8f772934cc4bf1f164124c9fbb0d0
tree601e3dac423c8528adb089df01cedb37e7416e88
parentc756ad036fc8ef432438e89aab63cc723eda39b4
KVM: x86: Setting rflags.rf during rep-string emulation

This patch updates RF for rep-string emulation.  The flag is set upon the first
iteration, and cleared after the last (if emulated). It is intended to make
sure that if a trap (in future data/io #DB emulation) or interrupt is delivered
to the guest during the rep-string instruction, RF will be set correctly. RF
affects whether instruction breakpoint in the guest is masked.

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