Re: [PATCH 05/17] KVM: PPC: Deliver program interrupts right away instead of queueing them
From: Alexander Graf <hidden>
Date: 2011-07-01 11:47:15
Also in:
kvm
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.
=20 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. =20 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
quoted hunk ↗ jump to hunk
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. =20 Signed-off-by: Paul Mackerras <redacted> --- arch/powerpc/kvm/book3s.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) =20diff --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)
=20
void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong flags)
{
- to_book3s(vcpu)->prog_flags =3D flags;Now that prog_flags is unused, please remove it from the headers. Alex