Re: [PATCH v3 17/41] KVM: arm64: Remove noop calls to timer save/restore from VHE switch

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 05:53:43PM +, Julien Grall wrote: > Hi Christoffer, > > On 01/12/2018 12:07 PM, Christoffer Dall wrote: > >The VHE switch function calls __timer_enable_traps and > >__timer_disable_traps which don't do anything on VHE systems. > >Therefore, simply remove these calls

Re: [PATCH v3 05/41] KVM: arm64: Move HCR_INT_OVERRIDE to default HCR_EL2 guest flag

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 11:38:50AM +, Julien Grall wrote: > Hi, > > On 01/12/2018 12:07 PM, Christoffer Dall wrote: > >From: Shih-Wei Li > > > >We always set the IMO and FMO bits in the HCR_EL2 when running the > >guest, regardless if we use the vgic or not. By

Re: [PATCH v3 26/41] KVM: arm64: Introduce framework for accessing deferred sysregs

2018-02-13 Thread Dave Martin
On Tue, Feb 13, 2018 at 09:55:02AM +0100, Christoffer Dall wrote: > On Fri, Feb 09, 2018 at 04:17:39PM +, Dave Martin wrote: > > On Thu, Jan 25, 2018 at 08:54:13PM +0100, Christoffer Dall wrote: > > > On Tue, Jan 23, 2018 at 04:04:40PM +, Dave Martin wrote: [...] > > > > The individual

Re: [PATCH v3 09/41] KVM: arm64: Defer restoring host VFP state to vcpu_put

2018-02-13 Thread Dave Martin
On Tue, Feb 13, 2018 at 09:51:30AM +0100, Christoffer Dall wrote: > On Fri, Feb 09, 2018 at 03:59:30PM +, Dave Martin wrote: > > On Wed, Feb 07, 2018 at 06:56:44PM +0100, Christoffer Dall wrote: > > > On Wed, Feb 07, 2018 at 04:49:55PM +, Dave Martin wrote: [...] > > Simply entering the

[PATCHv2] arm64/kvm: Prohibit guest LOR accesses

2018-02-13 Thread Mark Rutland
We don't currently limit guest accesses to the LOR registers, which we neither virtualize nor context-switch. As such, guests are provided with unusable information/controls, and are not isolated from each other (or the host). To prevent these issues, we can trap register accesses and present the

Re: [PATCH] arm64/kvm: Prohibit guest LOR accesses

2018-02-13 Thread Mark Rutland
On Tue, Feb 13, 2018 at 11:27:42AM +0100, Christoffer Dall wrote: > Hi Mark, Hi Christoffer, > On Mon, Feb 12, 2018 at 11:14:24AM +, Mark Rutland wrote: > > We don't currently limit guest accesses to the LOR registers, which we > > neither virtualize nor context-switch. As such, guests are

[PATCH] KVM: arm: Enable emulation of the physical timer

2018-02-13 Thread Jérémy Fanguède
Set the handlers to emulate read and write operations for CNTP_CTL, CNTP_CVAL and CNTP_TVAL registers in such a way that VMs can use the physical timer. Signed-off-by: Jérémy Fanguède --- This patch is the equivalent of this one: [1], but for arm 32bits

Re: [PATCH] arm64/kvm: Prohibit guest LOR accesses

2018-02-13 Thread Christoffer Dall
Hi Mark, On Mon, Feb 12, 2018 at 11:14:24AM +, Mark Rutland wrote: > We don't currently limit guest accesses to the LOR registers, which we > neither virtualize nor context-switch. As such, guests are provided with > unusable information/controls, and are not isolated from each other (or >

Re: [PATCH v3 26/41] KVM: arm64: Introduce framework for accessing deferred sysregs

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 04:17:39PM +, Dave Martin wrote: > On Thu, Jan 25, 2018 at 08:54:13PM +0100, Christoffer Dall wrote: > > On Tue, Jan 23, 2018 at 04:04:40PM +, Dave Martin wrote: > > > On Fri, Jan 12, 2018 at 01:07:32PM +0100, Christoffer Dall wrote: > > > > We are about to defer

Re: [PATCH v3 17/41] KVM: arm64: Remove noop calls to timer save/restore from VHE switch

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 05:53:43PM +, Julien Grall wrote: > Hi Christoffer, > > On 01/12/2018 12:07 PM, Christoffer Dall wrote: > >The VHE switch function calls __timer_enable_traps and > >__timer_disable_traps which don't do anything on VHE systems. > >Therefore, simply remove these calls

Re: [PATCH v3 09/41] KVM: arm64: Defer restoring host VFP state to vcpu_put

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 03:26:59PM +, Julien Grall wrote: > Hi Christoffer, > > On 01/12/2018 12:07 PM, Christoffer Dall wrote: > >Avoid saving the guest VFP registers and restoring the host VFP > >registers on every exit from the VM. Only when we're about to run > >userspace or other

Re: [PATCH v3 14/41] KVM: arm64: Introduce VHE-specific kvm_vcpu_run

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 05:34:05PM +, Julien Grall wrote: > Hi Christoffer, > > On 01/12/2018 12:07 PM, Christoffer Dall wrote: > >So far this is just a copy of the legacy non-VHE switch function, but we > >will start reworking these functions in separate directions to work on > >VHE and

Re: [PATCH v3 09/41] KVM: arm64: Defer restoring host VFP state to vcpu_put

2018-02-13 Thread Christoffer Dall
On Fri, Feb 09, 2018 at 03:59:30PM +, Dave Martin wrote: > On Wed, Feb 07, 2018 at 06:56:44PM +0100, Christoffer Dall wrote: > > On Wed, Feb 07, 2018 at 04:49:55PM +, Dave Martin wrote: > > > On Thu, Jan 25, 2018 at 08:46:53PM +0100, Christoffer Dall wrote: > > > > On Mon, Jan 22, 2018 at