summaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-10 13:46:53 (GMT)
committerAvi Kivity <avi@qumranet.com>2008-07-20 09:42:32 (GMT)
commit25be46080f1a446cb2bda3daadbd22a5682b955e (patch)
treed736f1c5982d4eefa5da40dac5d8e8074dfa0a76 /arch/x86/kvm
parent622395a9e63bf87a16faecf555ed02375cbae5b7 (diff)
downloadlinux-fsl-qoriq-25be46080f1a446cb2bda3daadbd22a5682b955e.tar.xz
KVM: Do not calculate linear rip in emulation failure report
If we're not gonna do anything (case in which failure is already reported), we do not need to even bother with calculating the linear rip. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index d731d4f..5d21bb6 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2081,11 +2081,11 @@ void kvm_report_emulation_failure(struct kvm_vcpu *vcpu, const char *context)
unsigned long rip = vcpu->arch.rip;
unsigned long rip_linear;
- rip_linear = rip + get_segment_base(vcpu, VCPU_SREG_CS);
-
if (reported)
return;
+ rip_linear = rip + get_segment_base(vcpu, VCPU_SREG_CS);
+
emulator_read_std(rip_linear, (void *)opcodes, 4, vcpu);
printk(KERN_ERR "emulation failed (%s) rip %lx %02x %02x %02x %02x\n",