<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/setup_64.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-06-20T19:01:17Z</updated>
<entry>
<title>powerpc/64s: Default l1d_size to 64K in RFI fallback flush</title>
<updated>2018-06-20T19:01:17Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2018-01-17T19:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5aeca10ed106e7a69e5b76b0585aa7c7f37f8f21'/>
<id>urn:sha1:5aeca10ed106e7a69e5b76b0585aa7c7f37f8f21</id>
<content type='text'>
[ Upstream commit 9dfbf78e4114fcaf4ef61c49885c3ab5bad40d0b ]

If there is no d-cache-size property in the device tree, l1d_size could
be zero. We don't actually expect that to happen, it's only been seen
on mambo (simulator) in some configurations.

A zero-size l1d_size leads to the loop in the asm wrapping around to
2^64-1, and then walking off the end of the fallback area and
eventually causing a page fault which is fatal.

Just default to 64K which is correct on some CPUs, and sane enough to
not cause a crash on others.

Fixes: aa8a5e0062ac9 ('powerpc/64s: Add support for RFI flush of L1-D cache')
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
[mpe: Rewrite comment and change log]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Move cpu_show_meltdown()</title>
<updated>2018-05-25T14:46:05Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-05-22T14:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b97a799752c0cf280a10a6eb1aec00d41c1c48d'/>
<id>urn:sha1:0b97a799752c0cf280a10a6eb1aec00d41c1c48d</id>
<content type='text'>
commit 8ad33041563a10b34988800c682ada14b2612533 upstream.

This landed in setup_64.c for no good reason other than we had nowhere
else to put it. Now that we have a security-related file, that is a
better place for it so move it.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Improve RFI L1-D cache flush fallback</title>
<updated>2018-01-23T05:16:33Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2018-01-17T13:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdcb1aefc5b3f7d0f1dc8b02673602bca2ff7a4b'/>
<id>urn:sha1:bdcb1aefc5b3f7d0f1dc8b02673602bca2ff7a4b</id>
<content type='text'>
The fallback RFI flush is used when firmware does not provide a way
to flush the cache. It's a "displacement flush" that evicts useful
data by displacing it with an uninteresting buffer.

The flush has to take care to work with implementation specific cache
replacment policies, so the recipe has been in flux. The initial
slow but conservative approach is to touch all lines of a congruence
class, with dependencies between each load. It has since been
determined that a linear pattern of loads without dependencies is
sufficient, and is significantly faster.

Measuring the speed of a null syscall with RFI fallback flush enabled
gives the relative improvement:

P8 - 1.83x
P9 - 1.75x

The flush also becomes simpler and more adaptable to different cache
geometries.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into next</title>
<updated>2018-01-21T12:21:14Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-01-21T12:21:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebf0b6a8b1e445d2be66087732aafcda12ab9f59'/>
<id>urn:sha1:ebf0b6a8b1e445d2be66087732aafcda12ab9f59</id>
<content type='text'>
Merge our fixes branch from the 4.15 cycle.

Unusually the fixes branch saw some significant features merged,
notably the RFI flush patches, so we want the code in next to be
tested against that, to avoid any surprises when the two are merged.

There's also some other work on the panic handling that was reverted
in fixes and we now want to do properly in next, which would conflict.

And we also fix a few other minor merge conflicts.
</content>
</entry>
<entry>
<title>powerpc/64: Rename soft_enabled to irq_soft_mask</title>
<updated>2018-01-19T11:37:01Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-12-20T03:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e26bc4a4ed683c42ba45f09050575a671c6f1f4'/>
<id>urn:sha1:4e26bc4a4ed683c42ba45f09050575a671c6f1f4</id>
<content type='text'>
Rename the paca-&gt;soft_enabled to paca-&gt;irq_soft_mask as it is no
longer used as a flag for interrupt state, but a mask.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64: Move set_soft_enabled() and rename</title>
<updated>2018-01-19T11:36:58Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-12-20T03:55:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b63acf4a0eb8843f83954ea1bd29ccdfcbaa778'/>
<id>urn:sha1:0b63acf4a0eb8843f83954ea1bd29ccdfcbaa778</id>
<content type='text'>
Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c, to
encourage updates to paca-&gt;soft_enabled done via these access
function. Add "memory" clobber to hint compiler since
paca-&gt;soft_enabled memory is the target here.

Renaming it as soft_enabled_set() will make namespaces works better as
prefix than a postfix when new soft_enabled manipulation functions are
introduced.

Reviewed-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64: Add #defines for paca-&gt;soft_enabled flags</title>
<updated>2018-01-19T11:36:56Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-12-20T03:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2e480ba822718190e58849b79a76db13c3dac18'/>
<id>urn:sha1:c2e480ba822718190e58849b79a76db13c3dac18</id>
<content type='text'>
Two #defines IRQS_ENABLED and IRQS_DISABLED are added to be used when
updating paca-&gt;soft_enabled. Replace the hardcoded values used when
updating paca-&gt;soft_enabled with IRQ_(EN|DIS)ABLED #define. No logic
change.

Reviewed-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Relax PACA address limitations</title>
<updated>2018-01-18T04:42:48Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2017-12-22T11:17:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1af19331a3a18296a918802dbe032a13328e264d'/>
<id>urn:sha1:1af19331a3a18296a918802dbe032a13328e264d</id>
<content type='text'>
Book3S PACA memory allocation is restricted by the RMA limit and also
must not take SLB faults when accessed in virtual mode. Currently a
fixed 256MB limit is used for this, which is imprecise and sub-optimal.

Update the paca allocation limits to use use the ppc64_rma_size for RMA
limit, and share the safe_stack_limit() that is currently used for stack
allocations that must not take virtual mode faults.

The safe_stack_limit() name is changed to ppc64_bolted_size() to match
ppc64_rma_size and some comments are updated. We also need to use
early_mmu_has_feature() because we are now calling this function prior
to the jump label patching that enables mmu_has_feature().

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Change mmu_has_feature() to early_mmu_has_feature()]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Allow control of RFI flush via debugfs</title>
<updated>2018-01-17T12:30:21Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-01-16T11:17:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=236003e6b5443c45c18e613d2b0d776a9f87540e'/>
<id>urn:sha1:236003e6b5443c45c18e613d2b0d776a9f87540e</id>
<content type='text'>
Expose the state of the RFI flush (enabled/disabled) via debugfs, and
allow it to be enabled/disabled at runtime.

eg: $ cat /sys/kernel/debug/powerpc/rfi_flush
    1
    $ echo 0 &gt; /sys/kernel/debug/powerpc/rfi_flush
    $ cat /sys/kernel/debug/powerpc/rfi_flush
    0

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Wire up cpu_show_meltdown()</title>
<updated>2018-01-17T12:30:20Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-01-16T10:20:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd6e440f20b1a4304553775fc55938848ff617c9'/>
<id>urn:sha1:fd6e440f20b1a4304553775fc55938848ff617c9</id>
<content type='text'>
The recent commit 87590ce6e373 ("sysfs/cpu: Add vulnerability folder")
added a generic folder and set of files for reporting information on
CPU vulnerabilities. One of those was for meltdown:

  /sys/devices/system/cpu/vulnerabilities/meltdown

This commit wires up that file for 64-bit Book3S powerpc.

For now we default to "Vulnerable" unless the RFI flush is enabled.
That may not actually be true on all hardware, further patches will
refine the reporting based on the CPU/platform etc. But for now we
default to being pessimists.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
