From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: clg@kaod.org, mpe@ellerman.id.au, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] KVM: PPC: Book3S HV: XIVE: Free escalation interrupts before" failed to apply to 4.19-stable tree
Date: Tue, 8 Oct 2019 17:45:50 -0400 [thread overview]
Message-ID: <20191008214550.GE1396@sasha-vm> (raw)
In-Reply-To: <1570519208179101@kroah.com>
On Tue, Oct 08, 2019 at 09:20:08AM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.19-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 237aed48c642328ff0ab19b63423634340224a06 Mon Sep 17 00:00:00 2001
>From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@kaod.org>
>Date: Tue, 6 Aug 2019 19:25:38 +0200
>Subject: [PATCH] KVM: PPC: Book3S HV: XIVE: Free escalation interrupts before
> disabling the VP
>MIME-Version: 1.0
>Content-Type: text/plain; charset=UTF-8
>Content-Transfer-Encoding: 8bit
>
>When a vCPU is brought done, the XIVE VP (Virtual Processor) is first
>disabled and then the event notification queues are freed. When freeing
>the queues, we check for possible escalation interrupts and free them
>also.
>
>But when a XIVE VP is disabled, the underlying XIVE ENDs also are
>disabled in OPAL. When an END (Event Notification Descriptor) is
>disabled, its ESB pages (ESn and ESe) are disabled and loads return all
>1s. Which means that any access on the ESB page of the escalation
>interrupt will return invalid values.
>
>When an interrupt is freed, the shutdown handler computes a 'saved_p'
>field from the value returned by a load in xive_do_source_set_mask().
>This value is incorrect for escalation interrupts for the reason
>described above.
>
>This has no impact on Linux/KVM today because we don't make use of it
>but we will introduce in future changes a xive_get_irqchip_state()
>handler. This handler will use the 'saved_p' field to return the state
>of an interrupt and 'saved_p' being incorrect, softlockup will occur.
>
>Fix the vCPU cleanup sequence by first freeing the escalation interrupts
>if any, then disable the XIVE VP and last free the queues.
>
>Fixes: 90c73795afa2 ("KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native exploitation mode")
>Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller")
>Cc: stable@vger.kernel.org # v4.12+
>Signed-off-by: Cédric Le Goater <clg@kaod.org>
>Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>Link: https://lore.kernel.org/r/20190806172538.5087-1-clg@kaod.org
I've dropped the xive native part on 4.19 and 4.14 because 90c73795afa24
("KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native
exploitation mode") isn't there.
--
Thanks,
Sasha
next prev parent reply other threads:[~2019-10-08 21:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 7:20 FAILED: patch "[PATCH] KVM: PPC: Book3S HV: XIVE: Free escalation interrupts before" failed to apply to 4.19-stable tree gregkh
2019-10-08 21:45 ` Sasha Levin [this message]
2019-10-09 6:03 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191008214550.GE1396@sasha-vm \
--to=sashal@kernel.org \
--cc=clg@kaod.org \
--cc=gregkh@linuxfoundation.org \
--cc=mpe@ellerman.id.au \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).