[PATCH 1/1] timecounter: Make cyclecounter struct part of timecounter struct

2017-12-01 Thread Sagar Arun Kamble
There is no real need for the users of timecounters to define cyclecounter and timecounter variables separately. Since timecounter will always be based on cyclecounter, have cyclecounter struct as member of timecounter struct. Suggested-by: Chris Wilson Signed-off-by:

Re: [PATCH 10/37] KVM: arm64: Slightly improve debug save/restore functions

2017-12-01 Thread Christoffer Dall
On Tue, Nov 07, 2017 at 03:22:29PM +0100, Andrew Jones wrote: > On Thu, Oct 12, 2017 at 12:41:14PM +0200, Christoffer Dall wrote: > > The debug save/restore functions can be improved by using the has_vhe() > > static key instead of the instruction alternative. Using the static key > > uses the

Re: [PATCH 11/37] KVM: arm64: Improve debug register save/restore flow

2017-12-01 Thread Christoffer Dall
On Tue, Nov 07, 2017 at 03:48:57PM +0100, Andrew Jones wrote: > On Thu, Oct 12, 2017 at 12:41:15PM +0200, Christoffer Dall wrote: > > Instead of having multiple calls from the world switch path to the debug > > logic, each figuring out if the dirty bit is set and if we should > > save/restore the

Re: [PATCH 09/37] KVM: arm64: Move debug dirty flag calculation out of world switch

2017-12-01 Thread Christoffer Dall
On Tue, Nov 07, 2017 at 03:09:19PM +0100, Andrew Jones wrote: > On Thu, Oct 12, 2017 at 12:41:13PM +0200, Christoffer Dall wrote: > > There is no need to figure out inside the world-switch if we should > > save/restore the debug registers or not, we can might as well do that in > > the higher

Re: [PATCH 13/37] KVM: arm64: Introduce VHE-specific kvm_vcpu_run

2017-12-01 Thread Christoffer Dall
On Tue, Nov 07, 2017 at 04:25:29PM +0100, Andrew Jones wrote: > On Thu, Oct 12, 2017 at 12:41:17PM +0200, Christoffer Dall wrote: > > So far this is just a copy of the legacy non-VHE switch function, where > > we only change the existing calls to has_vhe() in both the original and > > new

Re: [PATCH v5 3/8] KVM: arm/arm64: Don't cache the timer IRQ level

2017-12-01 Thread Andre Przywara
Hi, On 20/11/17 19:16, Christoffer Dall wrote: > The timer was modeled after a strict idea of modelling an interrupt line > level in software, meaning that only transitions in the level needed to > be reported to the VGIC. This works well for the timer, because the > arch timer code is in

Re: [PATCH v5 1/8] KVM: arm/arm64: Remove redundant preemptible checks

2017-12-01 Thread Andre Przywara
Hi, On 20/11/17 19:16, Christoffer Dall wrote: > The __this_cpu_read() and __this_cpu_write() functions already implement > checks for the required preemption levels when using > CONFIG_DEBUG_PREEMPT which gives you nice error messages and such. > Therefore there is no need to explicitly check

Re: [PATCH v5 2/8] KVM: arm/arm64: Factor out functionality to get vgic mmio requester_vcpu

2017-12-01 Thread Andre Przywara
Hi, On 20/11/17 19:16, Christoffer Dall wrote: > We are about to distinguish between userspace accesses and mmio traps > for a number of the mmio handlers. When the requester vcpu is NULL, it > mens we are handling a userspace acccess. > > Factor out the functionality to get the request vcpu

[PATCH 2/3] arm64: fpsimd: Abstract out binding of task's fpsimd context to the cpu.

2017-12-01 Thread Dave Martin
There is currently some duplicate logic to associate current's FPSIMD context with the cpu when loading FPSIMD state into the cpu regs. Subsequent patches will update that logic, so in order to ensure it only needs to be done in one place, this patch factors the relevant code out into a new

[PATCH 1/3] arm64: KVM: Move CPU ID reg trap setup off the world switch path

2017-12-01 Thread Dave Martin
The HCR_EL2.TID3 flag needs to be set when trapping guest access to the CPU ID registers is required. However, the decision about whether to set this bit does not need to be repeated at every switch to the guest. Instead, it's sufficient to make this decision once and record the outcome. This

[PATCH 0/3] arm64: SVE fixes for v4.15-rc1

2017-12-01 Thread Dave Martin
This mini-series contains a few fixes for known issues in the arm64 SVE patches that missed the merge window. They should be considered fixes for v4.15. Dave Martin (3): arm64: KVM: Move CPU ID reg trap setup off the world switch path arm64: fpsimd: Abstract out binding of task's fpsimd

Re: [PATCH v4 2/2] arm64: Add software workaround for Falkor erratum 1041

2017-12-01 Thread Will Deacon
On Mon, Nov 27, 2017 at 05:18:00PM -0600, Shanker Donthineni wrote: > The ARM architecture defines the memory locations that are permitted > to be accessed as the result of a speculative instruction fetch from > an exception level for which all stages of translation are disabled. > Specifically,

Re: [PATCH] KVM: arm/arm64: kvm_arch_destroy_vm cleanups

2017-12-01 Thread Christoffer Dall
On Fri, Dec 1, 2017 at 8:18 AM, Andrew Jones wrote: > On Fri, Dec 01, 2017 at 09:09:19AM +0100, Christoffer Dall wrote: >> Hi Drew, >> >> On Mon, Nov 27, 2017 at 07:17:18PM +0100, Andrew Jones wrote: >> > Recently commit b2c9a85dd75a ("KVM: arm/arm64: vgic: Move >> >

[PATCH 1/1] timecounter: Make cyclecounter struct part of timecounter struct

2017-12-01 Thread Sagar Arun Kamble
There is no real need for the users of timecounters to define cyclecounter and timecounter variables separately. Since timecounter will always be based on cyclecounter, have cyclecounter struct as member of timecounter struct. Suggested-by: Chris Wilson Signed-off-by:

Re: [PATCH] KVM: arm/arm64: kvm_arch_destroy_vm cleanups

2017-12-01 Thread Andrew Jones
On Fri, Dec 01, 2017 at 09:09:19AM +0100, Christoffer Dall wrote: > Hi Drew, > > On Mon, Nov 27, 2017 at 07:17:18PM +0100, Andrew Jones wrote: > > Recently commit b2c9a85dd75a ("KVM: arm/arm64: vgic: Move > > kvm_vgic_destroy call around") caught my eye. When I looked closer I > > saw that while

Re: [PATCH] KVM: arm/arm64: kvm_arch_destroy_vm cleanups

2017-12-01 Thread Christoffer Dall
Hi Drew, On Mon, Nov 27, 2017 at 07:17:18PM +0100, Andrew Jones wrote: > Recently commit b2c9a85dd75a ("KVM: arm/arm64: vgic: Move > kvm_vgic_destroy call around") caught my eye. When I looked closer I > saw that while it made the code saner, it wasn't changing anything. > kvm_for_each_vcpu()