diff options
author | Alexander Graf <agraf@suse.de> | 2012-02-16 15:07:37 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 11:55:05 +0200 |
commit | a8e4ef841429d338b8700998afb3dfc18c1f25d9 (patch) | |
tree | c5c28f33902b7c7e9de837732e5a97d46c22cc57 /arch/powerpc/kvm/book3s.c | |
parent | KVM: PPC: booke: deliver program int on emulation failure (diff) | |
download | linux-a8e4ef841429d338b8700998afb3dfc18c1f25d9.tar.xz linux-a8e4ef841429d338b8700998afb3dfc18c1f25d9.zip |
KVM: PPC: booke: rework rescheduling checks
Instead of checking whether we should reschedule only when we exited
due to an interrupt, let's always check before entering the guest back
again. This gets the target more in line with the other archs.
Also while at it, generalize the whole thing so that eventually we could
have a single kvmppc_prepare_to_enter function for all ppc targets that
does signal and reschedule checking for us.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 7d54f4ed6d96..c8ead7b9f03b 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -258,7 +258,7 @@ static bool clear_irqprio(struct kvm_vcpu *vcpu, unsigned int priority) return true; } -void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) +int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) { unsigned long *pending = &vcpu->arch.pending_exceptions; unsigned long old_pending = vcpu->arch.pending_exceptions; @@ -283,6 +283,8 @@ void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) /* Tell the guest about our interrupt status */ kvmppc_update_int_pending(vcpu, *pending, old_pending); + + return 0; } pfn_t kvmppc_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn) |