[PATCH 05/17] KVM: PPC: Deliver program interrupts right away instead of queueing them

Alexander Graf agraf at suse.de
Fri Jul 1 21:47:09 EST 2011


On 29.06.2011, at 12:18, Paul Mackerras wrote:

> Doing so means that we don't have to save the flags anywhere and gets
> rid of the last reference to to_book3s(vcpu) in arch/powerpc/kvm/book3s.c.
> 
> Doing so is OK because a program interrupt won't be generated at the
> same time as any other synchronous interrupt.  If a program interrupt
> and an asynchronous interrupt (external or decrementer) are generated
> at the same time, the program interrupt will be delivered, which is
> correct because it has a higher priority, and then the asynchronous
> interrupt will be masked.
> 
> We don't ever generate system reset or machine check interrupts to the
> guest, but if we did, then we would need to make sure they got delivered
> rather than the program interrupt.  The current code would be wrong in
> this situation anyway since it would deliver the program interrupt as
> well as the reset/machine check interrupt.
> 
> Signed-off-by: Paul Mackerras <paulus at samba.org>
> ---
> arch/powerpc/kvm/book3s.c |    8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 163e3e1..f68a34d 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -129,8 +129,8 @@ void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec)
> 
> void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong flags)
> {
> -	to_book3s(vcpu)->prog_flags = flags;

Now that prog_flags is unused, please remove it from the headers.


Alex



More information about the Linuxppc-dev mailing list