]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: PPC: Exit guest context while handling exit
authorAlexander Graf <agraf@suse.de>
Sun, 12 Aug 2012 09:29:09 +0000 (11:29 +0200)
committerAlexander Graf <agraf@suse.de>
Fri, 14 Sep 2012 14:26:05 +0000 (16:26 +0200)
The x86 implementation of KVM accounts for host time while processing
guest exits. Do the same for us.

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c

index 2c268a15b20fa028c8f64b865cf4b424290bf69a..b4ae11ec068f0319b5fb1b5c0f1d29224e0e0095 100644 (file)
@@ -601,6 +601,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
        __hard_irq_enable();
 
        trace_kvm_exit(exit_nr, vcpu);
+       kvm_guest_exit();
        preempt_enable();
 
        switch (exit_nr) {
@@ -872,6 +873,7 @@ program_interrupt:
                }
        }
 
+       kvm_guest_enter();
        trace_kvm_book3s_reenter(r, vcpu);
 
        return r;
index 492c343f598ee0ab424ac76a44951c842564cc14..887c7cc0214621e79610d586b023a3c49d4493be 100644 (file)
@@ -650,6 +650,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
        local_irq_enable();
 
        trace_kvm_exit(exit_nr, vcpu);
+       kvm_guest_exit();
 
        run->exit_reason = KVM_EXIT_UNKNOWN;
        run->ready_for_interrupt_injection = 1;
@@ -952,6 +953,8 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
                }
        }
 
+       kvm_guest_enter();
+
        return r;
 }