<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/sysdev/xive/common.c, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-06-17T14:42:46Z</updated>
<entry>
<title>powerpc/xive: Clear the page tables for the ESB IO mapping</title>
<updated>2020-06-17T14:42:46Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2020-04-29T07:51:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4777ed636154e46be2a8f527ba282ae7045662a'/>
<id>urn:sha1:c4777ed636154e46be2a8f527ba282ae7045662a</id>
<content type='text'>
[ Upstream commit a101950fcb78b0ba20cd487be6627dea58d55c2b ]

Commit 1ca3dec2b2df ("powerpc/xive: Prevent page fault issues in the
machine crash handler") fixed an issue in the FW assisted dump of
machines using hash MMU and the XIVE interrupt mode under the POWER
hypervisor. It forced the mapping of the ESB page of interrupts being
mapped in the Linux IRQ number space to make sure the 'crash kexec'
sequence worked during such an event. But it didn't handle the
un-mapping.

This mapping is now blocking the removal of a passthrough IO adapter
under the POWER hypervisor because it expects the guest OS to have
cleared all page table entries related to the adapter. If some are
still present, the RTAS call which isolates the PCI slot returns error
9001 "valid outstanding translations".

Remove these mapping in the IRQ data cleanup routine.

Under KVM, this cleanup is not required because the ESB pages for the
adapter interrupts are un-mapped from the guest by the hypervisor in
the KVM XIVE native device. This is now redundant but it's harmless.

Fixes: 1ca3dec2b2df ("powerpc/xive: Prevent page fault issues in the machine crash handler")
Cc: stable@vger.kernel.org # v5.5+
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200429075122.1216388-2-clg@kaod.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xive: Add a debugfs file to dump internal XIVE state</title>
<updated>2020-03-26T13:20:38Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2020-03-06T15:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=930914b7d528fc6b0249bffc00564100bcf6ef75'/>
<id>urn:sha1:930914b7d528fc6b0249bffc00564100bcf6ef75</id>
<content type='text'>
As does XMON, the debugfs file /sys/kernel/debug/powerpc/xive exposes
the XIVE internal state of the machine CPUs and interrupts. Available
on the PowerNV and sPAPR platforms.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
[mpe: Make the debugfs file 0400]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200306150143.5551-5-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xmon: Add source flags to output of XIVE interrupts</title>
<updated>2020-03-26T13:19:05Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2020-03-06T15:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5191e0ba51df3a886a2040002e09afd53f625232'/>
<id>urn:sha1:5191e0ba51df3a886a2040002e09afd53f625232</id>
<content type='text'>
Some firmwares or hypervisors can advertise different source
characteristics. Track their value under XMON. What we are mostly
interested in is the StoreEOI flag.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200306150143.5551-4-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xive: Fix xmon support on the PowerNV platform</title>
<updated>2020-03-26T13:19:05Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2020-03-06T15:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97ef275077932c65b1b8ec5022abd737a9fbf3e0'/>
<id>urn:sha1:97ef275077932c65b1b8ec5022abd737a9fbf3e0</id>
<content type='text'>
The PowerNV platform has multiple IRQ chips and the xmon command
dumping the state of the XIVE interrupt should only operate on the
XIVE IRQ chip.

Fixes: 5896163f7f91 ("powerpc/xmon: Improve output of XIVE interrupts")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200306150143.5551-3-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs</title>
<updated>2020-03-26T13:19:04Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2020-03-06T15:01:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1a504a6500df50e83b701b7946b34fce27ad8a3'/>
<id>urn:sha1:b1a504a6500df50e83b701b7946b34fce27ad8a3</id>
<content type='text'>
When a CPU is brought up, an IPI number is allocated and recorded
under the XIVE CPU structure. Invalid IPI numbers are tracked with
interrupt number 0x0.

On the PowerNV platform, the interrupt number space starts at 0x10 and
this works fine. However, on the sPAPR platform, it is possible to
allocate the interrupt number 0x0 and this raises an issue when CPU 0
is unplugged. The XIVE spapr driver tracks allocated interrupt numbers
in a bitmask and it is not correctly updated when interrupt number 0x0
is freed. It stays allocated and it is then impossible to reallocate.

Fix by using the XIVE_BAD_IRQ value instead of zero on both platforms.

Reported-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Tested-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200306150143.5551-2-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xive: Discard ESB load value when interrupt is invalid</title>
<updated>2020-01-22T09:31:41Z</updated>
<author>
<name>Frederic Barrat</name>
</author>
<published>2020-01-13T13:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17328f218fb760c9c6accc5b52494889243a6b98'/>
<id>urn:sha1:17328f218fb760c9c6accc5b52494889243a6b98</id>
<content type='text'>
A load on an ESB page returning all 1's means that the underlying
device has invalidated the access to the PQ state of the interrupt
through mmio. It may happen, for example when querying a PHB interrupt
while the PHB is in an error state.

In that case, we should consider the interrupt to be invalid when
checking its state in the irq_get_irqchip_state() handler.

Fixes: da15c03b047d ("powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
[clg: wrote a commit log, introduced XIVE_ESB_INVALID ]
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200113130118.27969-1-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xive: Prevent page fault issues in the machine crash handler</title>
<updated>2019-11-13T05:58:10Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2019-10-31T06:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ca3dec2b2dff9d286ce6cd64108bda0e98f9710'/>
<id>urn:sha1:1ca3dec2b2dff9d286ce6cd64108bda0e98f9710</id>
<content type='text'>
When the machine crash handler is invoked, all interrupts are masked
but interrupts which have not been started yet do not have an ESB page
mapped in the Linux address space. This crashes the 'crash kexec'
sequence on sPAPR guests.

To fix, force the mapping of the ESB page when an interrupt is being
mapped in the Linux IRQ number space. This is done by setting the
initial state of the interrupt to OFF which is not necessarily the
case on PowerNV.

Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller")
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20191031063100.3864-1-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xmon: Fix output of XIVE IPI</title>
<updated>2019-09-13T14:58:47Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2019-09-10T08:18:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=855d9140a394229f21fd4fd216f377ed45bd93a3'/>
<id>urn:sha1:855d9140a394229f21fd4fd216f377ed45bd93a3</id>
<content type='text'>
When dumping the XIVE state of an CPU IPI, xmon does not check if the
CPU is started or not which can cause an error. Add a check for that
and change the output to be on one line just as the XIVE interrupts of
the machine.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20190910081850.26038-3-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xmon: Improve output of XIVE interrupts</title>
<updated>2019-09-13T14:58:47Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2019-09-10T08:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5896163f7f91c0560cc41908c808661eee4c4121'/>
<id>urn:sha1:5896163f7f91c0560cc41908c808661eee4c4121</id>
<content type='text'>
When looping on the list of interrupts, add the current value of the
PQ bits with a load on the ESB page. This has the side effect of
faulting the ESB page of all interrupts.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20190910081850.26038-2-clg@kaod.org
</content>
</entry>
<entry>
<title>powerpc/xive: Fix dump of XIVE interrupt under pseries</title>
<updated>2019-08-19T03:20:24Z</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2019-08-14T15:47:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4868ff55d082bc66b0c287a41e4888f6d3e5f87'/>
<id>urn:sha1:b4868ff55d082bc66b0c287a41e4888f6d3e5f87</id>
<content type='text'>
The xmon 'dxi' command calls OPAL to query the XIVE configuration of a
interrupt. This can only be done on baremetal (PowerNV) and it will
crash a pseries machine.

Introduce a new XIVE get_irq_config() operation which implements a
different query depending on the platform, PowerNV or pseries, and
modify xmon to use a top level wrapper.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20190814154754.23682-3-clg@kaod.org

</content>
</entry>
</feed>
