Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-21 Thread Kees Cook
On Sat, Oct 21, 2017 at 11:45 AM, Christoffer Dall wrote: > We do direct useraccess copying to the kvm_cpu_context structure > embedded in the kvm_vcpu_arch structure, and to the vcpu debug register > state. Everything else (timer, PMU, vgic) goes through a temporary

Re: [PATCH v4 09/11] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-21 Thread Christoffer Dall
On Sat, Oct 21, 2017 at 04:36:22PM +0200, Auger Eric wrote: > Hi Christoffer, > > On 21/10/2017 16:31, Christoffer Dall wrote: > > On Sat, Oct 21, 2017 at 12:13:21PM +0200, Auger Eric wrote: > >> Hi Christoffer, > >> > >> On 18/10/2017 00:34, Christoffer Dall wrote: > >>> On Tue, Oct 17, 2017 at

Re: [PATCH v4 01/11] KVM: arm/arm64: vgic-its: fix return value for device table restore

2017-10-21 Thread Christoffer Dall
On Sat, Oct 21, 2017 at 04:40:00PM +0200, Auger Eric wrote: > Hi Christoffer, > > On 17/10/2017 23:40, Christoffer Dall wrote: > > On Tue, Oct 17, 2017 at 09:09:59AM +0200, Eric Auger wrote: > >> AT the moment if ITT only contains invalid entries, > >> vgic_its_restore_itt returns 1 and this is

Re: [PATCH v4 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts

2017-10-21 Thread Christoffer Dall
On Sat, Oct 21, 2017 at 04:55:01PM +0200, Thomas Gleixner wrote: > On Sat, 21 Oct 2017, Christoffer Dall wrote: > > > On Fri, Oct 20, 2017 at 01:56:16PM +0200, Thomas Gleixner wrote: > > > On Fri, 20 Oct 2017, Christoffer Dall wrote: > > > > > > Please Cc lkml when changing genirq core code. > >

Re: [PATCH v2 0/8] arm/arm64: KVM: limit icache invalidation to prefetch aborts

2017-10-21 Thread Christoffer Dall
Hi Marc, Will, Catalain, and Russell, On Fri, Oct 20, 2017 at 04:48:56PM +0100, Marc Zyngier wrote: > It was recently reported that on a VM restore, we seem to spend a > disproportionate amount of time invalidation the icache. This is > partially due to some HW behaviour, but also because we're

Re: [PATCH v2 2/8] arm: KVM: Add optimized PIPT icache flushing

2017-10-21 Thread Christoffer Dall
On Fri, Oct 20, 2017 at 05:54:40PM +0100, Mark Rutland wrote: > On Fri, Oct 20, 2017 at 05:53:39PM +0100, Marc Zyngier wrote: > > Hi Mark, > > > > On 20/10/17 17:27, Mark Rutland wrote: > > > Hi Marc, > > > > > > On Fri, Oct 20, 2017 at 04:48:58PM +0100, Marc Zyngier wrote: > > >> @@ -181,18

Re: [PATCH v2 6/8] KVM: arm/arm64: Preserve Exec permission across R/W permission faults

2017-10-21 Thread Christoffer Dall
On Fri, Oct 20, 2017 at 04:49:02PM +0100, Marc Zyngier wrote: > So far, we loose the Exec property whenever we take permission > faults, as we always reconstruct the PTE/PMD from scratch. This > can be counter productive as we can end-up with the following > fault sequence: > > X -> RO ->

Re: [RESEND PATCH 0/2] arm/arm64: kvm: Disable branch profiling in HYP code

2017-10-21 Thread Christoffer Dall
On Fri, Oct 20, 2017 at 12:34:15PM +0100, Julien Thierry wrote: > [Resending for Christoffer and adding kvmarm to recipients] > > Hi, > > When enabling branch profiling, a lockup occurs at boot time, after > displaying: "kvm [1]: Hyp mode initialized successfully" > > The issue is caused by the

Re: [PATCH v4 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts

2017-10-21 Thread Thomas Gleixner
On Sat, 21 Oct 2017, Christoffer Dall wrote: > On Fri, Oct 20, 2017 at 01:56:16PM +0200, Thomas Gleixner wrote: > > On Fri, 20 Oct 2017, Christoffer Dall wrote: > > > > Please Cc lkml when changing genirq core code. > > > > ok, will do so in the future. > > > > It is currently unclear how to

Re: [PATCH v4 01/11] KVM: arm/arm64: vgic-its: fix return value for device table restore

2017-10-21 Thread Auger Eric
Hi Christoffer, On 17/10/2017 23:40, Christoffer Dall wrote: > On Tue, Oct 17, 2017 at 09:09:59AM +0200, Eric Auger wrote: >> AT the moment if ITT only contains invalid entries, >> vgic_its_restore_itt returns 1 and this is considered as >> an an error in vgic_its_restore_dte. >> >> Also in case

Re: [PATCH v4 09/11] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-21 Thread Auger Eric
Hi Christoffer, On 21/10/2017 16:31, Christoffer Dall wrote: > On Sat, Oct 21, 2017 at 12:13:21PM +0200, Auger Eric wrote: >> Hi Christoffer, >> >> On 18/10/2017 00:34, Christoffer Dall wrote: >>> On Tue, Oct 17, 2017 at 09:10:07AM +0200, Eric Auger wrote: When the GITS_BASER.Valid gets

Re: [PATCH v4 09/11] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-21 Thread Christoffer Dall
On Sat, Oct 21, 2017 at 12:13:21PM +0200, Auger Eric wrote: > Hi Christoffer, > > On 18/10/2017 00:34, Christoffer Dall wrote: > > On Tue, Oct 17, 2017 at 09:10:07AM +0200, Eric Auger wrote: > >> When the GITS_BASER.Valid gets cleared, the data structures in > >> guest RAM are not valid anymore.

Re: [PATCH v4 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts

2017-10-21 Thread Christoffer Dall
On Fri, Oct 20, 2017 at 01:56:16PM +0200, Thomas Gleixner wrote: > On Fri, 20 Oct 2017, Christoffer Dall wrote: > > Please Cc lkml when changing genirq core code. > ok, will do so in the future. > > It is currently unclear how to set the VCPU affinity for a percpu_devid > > interrupt , since

Re: [PATCH v4 09/11] KVM: arm/arm64: vgic-its: free caches when GITS_BASER Valid bit is cleared

2017-10-21 Thread Auger Eric
Hi Christoffer, On 18/10/2017 00:34, Christoffer Dall wrote: > On Tue, Oct 17, 2017 at 09:10:07AM +0200, Eric Auger wrote: >> When the GITS_BASER.Valid gets cleared, the data structures in >> guest RAM are not valid anymore. The device, collection >> and LPI lists stored in the in-kernel ITS