[PATCH] KVM: arm/arm64: Unify 32bit fault injection

2017-10-28 Thread Marc Zyngier
Both arm and arm64 implementations are capable of injecting fauls, and yet have completely divergent implementations, leading to different bugs and reduced maintainability. Let's get elect the arm64 version as the canonical one and move it into aarch32.c, which is common to both architectures. Si

Re: [PATCH v4 25/26] KVM: arm/arm64: GICv4: Prevent heterogenous systems from using GICv4

2017-10-28 Thread Christoffer Dall
On Fri, Oct 27, 2017 at 09:31:12AM +0100, Marc Zyngier wrote: > On Fri, Oct 27 2017 at 9:04:21 am BST, Mark Rutland > wrote: > > On Fri, Oct 27, 2017 at 08:59:23AM +0100, Marc Zyngier wrote: > >> On Fri, Oct 27 2017 at 8:37:28 am BST, Mark Rutland > >> wrote: > >> > On Fri, Oct 27, 2017 at 07

Re: [PATCH v5 21/20] arm/arm64: KVM: Load the timer state when enabling the timer

2017-10-28 Thread Marc Zyngier
On Sun, Oct 29 2017 at 2:48:56 am GMT, Christoffer Dall wrote: > After being lazy with saving/restoring the timer state, we defer that > work to vcpu_load and vcpu_put, which ensure that the timer state is > loaded on the hardware timers whenever the VCPU runs. > > Unfortunately, we are failing

Re: [PATCH v5 02/20] arm64: Implement arch_counter_get_cntpct to read the physical counter

2017-10-28 Thread Christoffer Dall
On Fri, Oct 27, 2017 at 11:53:24AM +0100, Catalin Marinas wrote: > On Fri, Oct 27, 2017 at 10:34:23AM +0200, Christoffer Dall wrote: > > From: Christoffer Dall > > > > As we are about to use the physical counter on arm64 systems that have > > KVM support, implement arch_counter_get_cntpct() and t

[PATCH v5 21/20] arm/arm64: KVM: Load the timer state when enabling the timer

2017-10-28 Thread Christoffer Dall
After being lazy with saving/restoring the timer state, we defer that work to vcpu_load and vcpu_put, which ensure that the timer state is loaded on the hardware timers whenever the VCPU runs. Unfortunately, we are failing to do that the first time vcpu_load() runs, because the timer has not yet b

Re: [PATCH v3] KVM: arm/arm64: fix the incompatible matching for external abort

2017-10-28 Thread Marc Zyngier
On Sat, Oct 28 2017 at 2:45:59 pm BST, Dongjiu Geng wrote: > For this matching, switch expression uses fault type which is > not {I,D}FSC value, but the case expression uses {I,D}FSC, > they are incompatible. So change the switch expression to > use {I,D}FSC. I'm sorry, but I can't manage to pa

Re: [PATCH v4 20/28] arm64/sve: Add prctl controls for userspace vector length management

2017-10-28 Thread Dave Martin
On Fri, Oct 27, 2017 at 06:52:50PM +0100, Alex Bennée wrote: > > Dave Martin writes: > > > This patch adds two arm64-specific prctls, to permit userspace to > > control its vector length: > > > > * PR_SVE_SET_VL: set the thread's SVE vector length and vector > >length inheritance mode. > >