Re: [PATCH v2 00/17] arm64 SSBD (aka Spectre-v4) mitigation

2018-05-30 Thread Will Deacon
Hi Marc, On Tue, May 29, 2018 at 01:11:04PM +0100, Marc Zyngier wrote: > This patch series implements the Linux kernel side of the "Spectre-v4" > (CVE-2018-3639) mitigation known as "Speculative Store Bypass Disable" > (SSBD). > > More information can be found at: > >

[PATCH v2 0/6] KVM/arm64: Cache maintenance relaxations

2018-05-30 Thread Marc Zyngier
This small series makes use of features recently introduced in the ARMv8 architecture to relax the cache maintenance operations on CPUs that implement these features. FWB is the most important one. It allows stage-2 to enforce the cacheability of memory, no matter what the guest says. It also

[PATCH v2 1/6] arm64: KVM: Add support for Stage-2 control of memory types and cacheability

2018-05-30 Thread Marc Zyngier
Up to ARMv8.3, the combinaison of Stage-1 and Stage-2 attributes results in the strongest attribute of the two stages. This means that the hypervisor has to perform quite a lot of cache maintenance just in case the guest has some non-cacheable mappings around. ARMv8.4 solves this problem by

[PATCH v2 2/6] arm64: KVM: Handle Set/Way CMOs as NOPs if FWB is present

2018-05-30 Thread Marc Zyngier
Set/Way handling is one of the ugliest corners of KVM. We shouldn't have to handle that, but better safe than sorry. Thankfully, FWB fixes this for us by not requiering any maintenance whatsoever, which means we don't have to emulate S/W CMOs, and don't have to track VM ops either. We still have

[PATCH v2 4/6] KVM: arm/arm64: Consolidate page-table accessors

2018-05-30 Thread Marc Zyngier
The arm and arm64 KVM page tables accessors are pointlessly different between the two architectures, and likely both wrong one way or another: arm64 lacks a dsb(), and arm doesn't use WRITE_ONCE. Let's unify them. Signed-off-by: Marc Zyngier --- arch/arm/include/asm/kvm_mmu.h | 12

[PATCH v2 5/6] KVM: arm/arm64: Stop using {pmd,pud,pgd}_populate

2018-05-30 Thread Marc Zyngier
The {pmd,pud,pgd}_populate accessors usage in the kernel have always been a bit weird in KVM. We don't have a struct mm to pass (and neither does the kernel most of the time, but still...), and the 32bit code has all kind of cache maintenance that doesn't make sense on ARMv7+ when MP extensions