projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec10b72
)
KVM: x86: Clearing rflags.rf upon skipped emulated instruction
author
Nadav Amit
<namit@cs.technion.ac.il>
Mon, 21 Jul 2014 11:37:26 +0000
(14:37 +0300)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Mon, 21 Jul 2014 11:41:32 +0000
(13:41 +0200)
When skipping an emulated instruction, rflags.rf should be cleared as it would
be on real x86 CPU.
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index f750b69ca44311299a109de3752f72b326c6b67b..1fd806cb96d4802287ae2a0fdbb1b801a246fe55 100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-5229,6
+5229,8
@@
int x86_emulate_instruction(struct kvm_vcpu *vcpu,
if (emulation_type & EMULTYPE_SKIP) {
kvm_rip_write(vcpu, ctxt->_eip);
+ if (ctxt->eflags & X86_EFLAGS_RF)
+ kvm_set_rflags(vcpu, ctxt->eflags & ~X86_EFLAGS_RF);
return EMULATE_DONE;
}