]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Do not calculate linear rip in emulation failure report
authorGlauber Costa <gcosta@redhat.com>
Tue, 10 Jun 2008 13:46:53 +0000 (10:46 -0300)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:42:32 +0000 (12:42 +0300)
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>
arch/x86/kvm/x86.c

index d731d4fff1ae0f19f2ef59f86ceb7b6b45a78002..5d21bb69d88c99d56c9aa22f9c26536c2cbf876c 100644 (file)
@@ -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",