From: Alexander Graf <agraf@suse.de> To: kvm-ppc@vger.kernel.org Cc: KVM list <kvm@vger.kernel.org> Subject: [PATCH 06/10] KVM: PPC: Exit guest context while handling exit Date: Mon, 13 Aug 2012 03:21:31 +0200 [thread overview] Message-ID: <1344820895-8475-7-git-send-email-agraf@suse.de> (raw) In-Reply-To: <1344820895-8475-1-git-send-email-agraf@suse.de> 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 | 2 ++ arch/powerpc/kvm/booke.c | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index d39cfdc..ed9ac3f 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -603,6 +603,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) { @@ -874,6 +875,7 @@ program_interrupt: } } + kvm_guest_enter(); trace_kvm_book3s_reenter(r, vcpu); return r; diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 492c343..887c7cc 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -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; } -- 1.6.0.2
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de> To: kvm-ppc@vger.kernel.org Cc: KVM list <kvm@vger.kernel.org> Subject: [PATCH 06/10] KVM: PPC: Exit guest context while handling exit Date: Mon, 13 Aug 2012 01:21:31 +0000 [thread overview] Message-ID: <1344820895-8475-7-git-send-email-agraf@suse.de> (raw) In-Reply-To: <1344820895-8475-1-git-send-email-agraf@suse.de> 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 | 2 ++ arch/powerpc/kvm/booke.c | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index d39cfdc..ed9ac3f 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -603,6 +603,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) { @@ -874,6 +875,7 @@ program_interrupt: } } + kvm_guest_enter(); trace_kvm_book3s_reenter(r, vcpu); return r; diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 492c343..887c7cc 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -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; } -- 1.6.0.2
next prev parent reply other threads:[~2012-08-13 1:21 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-13 1:21 [PATCH 00/10] Book3S MMU Notifiers, subarch unification, lazy ee Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 01/10] KVM: PPC: BookE: No duplicate request != 0 check Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 02/10] KVM: PPC: Use same kvmppc_prepare_to_enter code for booke and book3s_pr Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 03/10] KVM: PPC: Book3s: PR: Add (dumb) MMU Notifier support Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 04/10] KVM: PPC: BookE: Drop redundant vcpu->mode set Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 05/10] KVM: PPC: Book3S: PR: Only do resched check once per exit Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` Alexander Graf [this message] 2012-08-13 1:21 ` [PATCH 06/10] KVM: PPC: Exit guest context while handling exit Alexander Graf 2012-08-13 1:21 ` [PATCH 07/10] KVM: PPC: Book3S: PR: Indicate we're out of guest mode Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 08/10] KVM: PPC: Consistentify vcpu exit path Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 09/10] KVM: PPC: Book3S: PR: Rework irq disabling Alexander Graf 2012-08-13 1:21 ` Alexander Graf 2012-08-13 1:21 ` [PATCH 10/10] KVM: PPC: Move kvm_guest_enter call into generic code Alexander Graf 2012-08-13 1:21 ` Alexander Graf
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1344820895-8475-7-git-send-email-agraf@suse.de \ --to=agraf@suse.de \ --cc=kvm-ppc@vger.kernel.org \ --cc=kvm@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.