KVM: PPC: Book3S: fix XIVE migration of pending interrupts
authorCédric Le Goater <clg@kaod.org>
Tue, 12 Dec 2017 12:02:04 +0000 (12:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Dec 2017 16:53:48 +0000 (17:53 +0100)
commit8708f682836827e8c593e370430a3156766b2fe2
tree7d76a4deb0e437200fffce4deba2a0767fff01b4
parent4e9cca9267feb13658a3bb6785a5649b76e684e0
KVM: PPC: Book3S: fix XIVE migration of pending interrupts

commit dc1c4165d189350cb51bdd3057deb6ecd164beda upstream.

When restoring a pending interrupt, we are setting the Q bit to force
a retrigger in xive_finish_unmask(). But we also need to force an EOI
in this case to reach the same initial state : P=1, Q=0.

This can be done by not setting 'old_p' for pending interrupts which
will inform xive_finish_unmask() that an EOI needs to be sent.

Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller")
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kvm/book3s_xive.c