<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/include/asm/sysreg.h, 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-01-16T15:09:47Z</updated>
<entry>
<title>KVM: arm64: Emulate RAS error registers and set HCR_EL2's TERR &amp; TEA</title>
<updated>2018-01-16T15:09:47Z</updated>
<author>
<name>Dongjiu Geng</name>
</author>
<published>2018-01-15T19:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=558daf693e0c7ea118dbfb9539aa5a72f34bad2e'/>
<id>urn:sha1:558daf693e0c7ea118dbfb9539aa5a72f34bad2e</id>
<content type='text'>
ARMv8.2 adds a new bit HCR_EL2.TEA which routes synchronous external
aborts to EL2, and adds a trap control bit HCR_EL2.TERR which traps
all Non-secure EL1&amp;0 error record accesses to EL2.

This patch enables the two bits for the guest OS, guaranteeing that
KVM takes external aborts and traps attempts to access the physical
error registers.

ERRIDR_EL1 advertises the number of error records, we return
zero meaning we can treat all the other registers as RAZ/WI too.

Signed-off-by: Dongjiu Geng &lt;gengdongjiu@huawei.com&gt;
[removed specific emulation, use trap_raz_wi() directly for everything,
 rephrased parts of the commit message]
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Save/Restore guest DISR_EL1</title>
<updated>2018-01-16T15:08:52Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2018-01-15T19:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c773ae2b34760a1ae409614aa31cdded81a645a5'/>
<id>urn:sha1:c773ae2b34760a1ae409614aa31cdded81a645a5</id>
<content type='text'>
If we deliver a virtual SError to the guest, the guest may defer it
with an ESB instruction. The guest reads the deferred value via DISR_EL1,
but the guests view of DISR_EL1 is re-mapped to VDISR_EL2 when HCR_EL2.AMO
is set.

Add the KVM code to save/restore VDISR_EL2, and make it accessible to
userspace as DISR_EL1.

Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2.</title>
<updated>2018-01-16T15:08:41Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2018-01-15T19:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4715c14bc136687bb79d12e24aafdc0f38786eb7'/>
<id>urn:sha1:4715c14bc136687bb79d12e24aafdc0f38786eb7</id>
<content type='text'>
Prior to v8.2's RAS Extensions, the HCR_EL2.VSE 'virtual SError' feature
generated an SError with an implementation defined ESR_EL1.ISS, because we
had no mechanism to specify the ESR value.

On Juno this generates an all-zero ESR, the most significant bit 'ISV'
is clear indicating the remainder of the ISS field is invalid.

With the RAS Extensions we have a mechanism to specify this value, and the
most significant bit has a new meaning: 'IDS - Implementation Defined
Syndrome'. An all-zero SError ESR now means: 'RAS error: Uncategorized'
instead of 'no valid ISS'.

Add KVM support for the VSESR_EL2 register to specify an ESR value when
HCR_EL2.VSE generates a virtual SError. Change kvm_inject_vabt() to
specify an implementation-defined value.

We only need to restore the VSESR_EL2 value when HCR_EL2.VSE is set, KVM
save/restores this bit during __{,de}activate_traps() and hardware clears the
bit once the guest has consumed the virtual-SError.

Future patches may add an API (or KVM CAP) to pend a virtual SError with
a specified ESR.

Cc: Dongjiu Geng &lt;gengdongjiu@huawei.com&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;</content>
</entry>
<entry>
<title>arm64: kernel: Prepare for a DISR user</title>
<updated>2018-01-16T15:07:12Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2018-01-15T19:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68ddbf09ec5a888ec850edd7e7438d2daf069c56'/>
<id>urn:sha1:68ddbf09ec5a888ec850edd7e7438d2daf069c56</id>
<content type='text'>
KVM would like to consume any pending SError (or RAS error) after guest
exit. Today it has to unmask SError and use dsb+isb to synchronise the
CPU. With the RAS extensions we can use ESB to synchronise any pending
SError.

Add the necessary macros to allow DISR to be read and converted to an
ESR.

We clear the DISR register when we enable the RAS cpufeature, and the
kernel has not executed any ESB instructions. Any value we find in DISR
must have belonged to firmware. Executing an ESB instruction is the
only way to update DISR, so we can expect firmware to have handled
any deferred SError. By the same logic we clear DISR in the idle path.

Reviewed-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;</content>
</entry>
<entry>
<title>arm64: Unconditionally enable IESB on exception entry/return for firmware-first</title>
<updated>2018-01-16T15:06:45Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2018-01-15T19:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f751daa4f9d3da07e2777ea0c1ba2d58ff2c860f'/>
<id>urn:sha1:f751daa4f9d3da07e2777ea0c1ba2d58ff2c860f</id>
<content type='text'>
ARM v8.2 has a feature to add implicit error synchronization barriers
whenever the CPU enters or returns from an exception level. Add this to the
features we always enable. CPUs that don't support this feature will treat
the bit as RES0.

This feature causes RAS errors that are not yet visible to software to
become pending SErrors. We expect to have firmware-first RAS support
so synchronised RAS errors will be take immediately to EL3.
Any system without firmware-first handling of errors will take the SError
either immediatly after exception return, or when we unmask SError after
entry.S's work.

Adding IESB to the ELx flags causes it to be enabled by KVM and kexec
too.

Platform level RAS support may require additional firmware support.

Cc: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Suggested-by: Will Deacon &lt;will.deacon@arm.com&gt;
Link: https://www.spinics.net/lists/kvm-arm/msg28192.html
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;</content>
</entry>
<entry>
<title>arm64: cpufeature: Detect CPU RAS Extentions</title>
<updated>2018-01-16T15:05:48Z</updated>
<author>
<name>Xie XiuQi</name>
</author>
<published>2018-01-15T19:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64c02720ea3598bf5143b672274d923a941b8053'/>
<id>urn:sha1:64c02720ea3598bf5143b672274d923a941b8053</id>
<content type='text'>
ARM's v8.2 Extentions add support for Reliability, Availability and
Serviceability (RAS). On CPUs with these extensions system software
can use additional barriers to isolate errors and determine if faults
are pending. Add cpufeature detection.

Platform level RAS support may require additional firmware support.

Reviewed-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Xie XiuQi &lt;xiexiuqi@huawei.com&gt;
[Rebased added config option, reworded commit message]
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: sysreg: Move to use definitions for all the SCTLR bits</title>
<updated>2018-01-16T15:05:39Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2018-01-15T19:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a00d68ebe5f07cb1db17e7fedfd031f0d87e8bb'/>
<id>urn:sha1:7a00d68ebe5f07cb1db17e7fedfd031f0d87e8bb</id>
<content type='text'>
__cpu_setup() configures SCTLR_EL1 using some hard coded hex masks,
and el2_setup() duplicates some this when setting RES1 bits.

Lets make this the same as KVM's hyp_init, which uses named bits.

First, we add definitions for all the SCTLR_EL{1,2} bits, the RES{1,0}
bits, and those we want to set or clear.

Add a build_bug checks to ensures all bits are either set or clear.
This means we don't need to preserve endian-ness configuration
generated elsewhere.

Finally, move the head.S and proc.S users of these hard-coded masks
over to the macro versions.

Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: Add skeleton to harden the branch predictor against aliasing attacks</title>
<updated>2018-01-08T18:45:25Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2018-01-03T11:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f15adbb2861ce6f75ccfc5a92b19eae0ef327d0'/>
<id>urn:sha1:0f15adbb2861ce6f75ccfc5a92b19eae0ef327d0</id>
<content type='text'>
Aliasing attacks against CPU branch predictors can allow an attacker to
redirect speculative control flow on some CPUs and potentially divulge
information from one context to another.

This patch adds initial skeleton code behind a new Kconfig option to
enable implementation-specific mitigations against these attacks for
CPUs that are affected.

Co-developed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: Take into account ID_AA64PFR0_EL1.CSV3</title>
<updated>2018-01-08T18:43:34Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2017-11-27T18:29:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179a56f6f9fbda28f6ca07db1fc3dfad6bc7343c'/>
<id>urn:sha1:179a56f6f9fbda28f6ca07db1fc3dfad6bc7343c</id>
<content type='text'>
For non-KASLR kernels where the KPTI behaviour has not been overridden
on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether
or not we should unmap the kernel whilst running at EL0.

Reviewed-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: v8.4: Support for new floating point multiplication instructions</title>
<updated>2018-01-05T11:29:48Z</updated>
<author>
<name>Dongjiu Geng</name>
</author>
<published>2017-12-13T10:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b3b681097fae73b7f5dcdd42db6cfdf32943d4c'/>
<id>urn:sha1:3b3b681097fae73b7f5dcdd42db6cfdf32943d4c</id>
<content type='text'>
ARM v8.4 extensions add new neon instructions for performing a
multiplication of each FP16 element of one vector with the corresponding
FP16 element of a second vector, and to add or subtract this without an
intermediate rounding to the corresponding FP32 element in a third vector.

This patch detects this feature and let the userspace know about it via a
HWCAP bit and MRS emulation.

Cc: Dave Martin &lt;Dave.Martin@arm.com&gt;
Reviewed-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Dongjiu Geng &lt;gengdongjiu@huawei.com&gt;
Reviewed-by: Dave Martin &lt;Dave.Martin@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;</content>
</entry>
</feed>
