diff options
author | Scott Wood <scottwood@freescale.com> | 2011-11-08 19:23:20 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-05 07:52:25 -0500 |
commit | 7e28e60ef974d0eeb43112ef264d8c130f7b7bf4 (patch) | |
tree | 8abf647afcd01a0768c1163e019a26856bd706d8 | |
parent | 1d1ef22208876511224a8797657e40e287e1f93d (diff) |
KVM: PPC: Rename deliver_interrupts to prepare_to_enter
This function also updates paravirt int_pending, so rename it
to be more obvious that this is a collection of checks run prior
to (re)entering a guest.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/powerpc/include/asm/kvm_ppc.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_pr.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/booke.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index a284f209e2df..c089927f64cc 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h | |||
@@ -94,7 +94,7 @@ extern int kvmppc_core_vcpu_translate(struct kvm_vcpu *vcpu, | |||
94 | extern void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, int cpu); | 94 | extern void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, int cpu); |
95 | extern void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu); | 95 | extern void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu); |
96 | 96 | ||
97 | extern void kvmppc_core_deliver_interrupts(struct kvm_vcpu *vcpu); | 97 | extern void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu); |
98 | extern int kvmppc_core_pending_dec(struct kvm_vcpu *vcpu); | 98 | extern int kvmppc_core_pending_dec(struct kvm_vcpu *vcpu); |
99 | extern void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong flags); | 99 | extern void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong flags); |
100 | extern void kvmppc_core_queue_dec(struct kvm_vcpu *vcpu); | 100 | extern void kvmppc_core_queue_dec(struct kvm_vcpu *vcpu); |
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index e41ac6f7dcf1..73fc9f046107 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) | |||
258 | return true; | 258 | return true; |
259 | } | 259 | } |
260 | 260 | ||
261 | void kvmppc_core_deliver_interrupts(struct kvm_vcpu *vcpu) | 261 | void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) |
262 | { | 262 | { |
263 | unsigned long *pending = &vcpu->arch.pending_exceptions; | 263 | unsigned long *pending = &vcpu->arch.pending_exceptions; |
264 | unsigned long old_pending = vcpu->arch.pending_exceptions; | 264 | unsigned long old_pending = vcpu->arch.pending_exceptions; |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 336983da9e72..536adee59c07 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -482,7 +482,7 @@ static void kvmppc_set_timer(struct kvm_vcpu *vcpu) | |||
482 | if (now > vcpu->arch.dec_expires) { | 482 | if (now > vcpu->arch.dec_expires) { |
483 | /* decrementer has already gone negative */ | 483 | /* decrementer has already gone negative */ |
484 | kvmppc_core_queue_dec(vcpu); | 484 | kvmppc_core_queue_dec(vcpu); |
485 | kvmppc_core_deliver_interrupts(vcpu); | 485 | kvmppc_core_prepare_to_enter(vcpu); |
486 | return; | 486 | return; |
487 | } | 487 | } |
488 | dec_nsec = (vcpu->arch.dec_expires - now) * NSEC_PER_SEC | 488 | dec_nsec = (vcpu->arch.dec_expires - now) * NSEC_PER_SEC |
@@ -797,7 +797,7 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
797 | 797 | ||
798 | list_for_each_entry_safe(v, vn, &vc->runnable_threads, | 798 | list_for_each_entry_safe(v, vn, &vc->runnable_threads, |
799 | arch.run_list) { | 799 | arch.run_list) { |
800 | kvmppc_core_deliver_interrupts(v); | 800 | kvmppc_core_prepare_to_enter(v); |
801 | if (signal_pending(v->arch.run_task)) { | 801 | if (signal_pending(v->arch.run_task)) { |
802 | kvmppc_remove_runnable(vc, v); | 802 | kvmppc_remove_runnable(vc, v); |
803 | v->stat.signal_exits++; | 803 | v->stat.signal_exits++; |
@@ -857,7 +857,7 @@ int kvmppc_vcpu_run(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
857 | if (run->exit_reason == KVM_EXIT_PAPR_HCALL && | 857 | if (run->exit_reason == KVM_EXIT_PAPR_HCALL && |
858 | !(vcpu->arch.shregs.msr & MSR_PR)) { | 858 | !(vcpu->arch.shregs.msr & MSR_PR)) { |
859 | r = kvmppc_pseries_do_hcall(vcpu); | 859 | r = kvmppc_pseries_do_hcall(vcpu); |
860 | kvmppc_core_deliver_interrupts(vcpu); | 860 | kvmppc_core_prepare_to_enter(vcpu); |
861 | } | 861 | } |
862 | } while (r == RESUME_GUEST); | 862 | } while (r == RESUME_GUEST); |
863 | return r; | 863 | return r; |
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index e2cfb9e1e20e..f3628581fb7c 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -764,7 +764,7 @@ program_interrupt: | |||
764 | /* In case an interrupt came in that was triggered | 764 | /* In case an interrupt came in that was triggered |
765 | * from userspace (like DEC), we need to check what | 765 | * from userspace (like DEC), we need to check what |
766 | * to inject now! */ | 766 | * to inject now! */ |
767 | kvmppc_core_deliver_interrupts(vcpu); | 767 | kvmppc_core_prepare_to_enter(vcpu); |
768 | } | 768 | } |
769 | } | 769 | } |
770 | 770 | ||
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 9c785896e867..e082e348c882 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -289,7 +289,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, | |||
289 | } | 289 | } |
290 | 290 | ||
291 | /* Check pending exceptions and deliver one, if possible. */ | 291 | /* Check pending exceptions and deliver one, if possible. */ |
292 | void kvmppc_core_deliver_interrupts(struct kvm_vcpu *vcpu) | 292 | void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) |
293 | { | 293 | { |
294 | unsigned long *pending = &vcpu->arch.pending_exceptions; | 294 | unsigned long *pending = &vcpu->arch.pending_exceptions; |
295 | unsigned long old_pending = vcpu->arch.pending_exceptions; | 295 | unsigned long old_pending = vcpu->arch.pending_exceptions; |
@@ -611,7 +611,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
611 | 611 | ||
612 | local_irq_disable(); | 612 | local_irq_disable(); |
613 | 613 | ||
614 | kvmppc_core_deliver_interrupts(vcpu); | 614 | kvmppc_core_prepare_to_enter(vcpu); |
615 | 615 | ||
616 | if (!(r & RESUME_HOST)) { | 616 | if (!(r & RESUME_HOST)) { |
617 | /* To avoid clobbering exit_reason, only check for signals if | 617 | /* To avoid clobbering exit_reason, only check for signals if |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 3cf6fba513ac..6186ec0d939b 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -559,7 +559,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
559 | vcpu->arch.hcall_needed = 0; | 559 | vcpu->arch.hcall_needed = 0; |
560 | } | 560 | } |
561 | 561 | ||
562 | kvmppc_core_deliver_interrupts(vcpu); | 562 | kvmppc_core_prepare_to_enter(vcpu); |
563 | 563 | ||
564 | r = kvmppc_vcpu_run(run, vcpu); | 564 | r = kvmppc_vcpu_run(run, vcpu); |
565 | 565 | ||