Re: [PATCH] KVM: arm64: Fix definition of PAGE_HYP_DEVICE

2020-07-08 Thread Will Deacon
On Wed, 8 Jul 2020 17:25:46 +0100, Will Deacon wrote: > PAGE_HYP_DEVICE is intended to encode attribute bits for an EL2 stage-1 > pte mapping a device. Unfortunately, it includes PROT_DEVICE_nGnRE which > encodes attributes for EL1 stage-1 mappings such as UXN and nG, which are > RES0 for EL2, and

Re: [PATCH] KVM: arm64: Fix definition of PAGE_HYP_DEVICE

2020-07-08 Thread Marc Zyngier
On 2020-07-08 17:25, Will Deacon wrote: PAGE_HYP_DEVICE is intended to encode attribute bits for an EL2 stage-1 pte mapping a device. Unfortunately, it includes PROT_DEVICE_nGnRE which encodes attributes for EL1 stage-1 mappings such as UXN and nG, which are RES0 for EL2, and DBM which is

Re: [PATCH v3 17/17] KVM: arm64: timers: Move timer registers to the sys_regs file

2020-07-08 Thread Alexandru Elisei
Hi Marc, At first I was a bit apprehensive about adding yet another layer of indirection to the arch timer. But after spending some time trying to figure out if there's a better way to do it, I came to the conclusion that the patch is actually an improvement because it makes it obvious what

Re: [PATCH] arm64: kvm: Remove redundant KVM_ARM64_FP_HOST flag

2020-07-08 Thread Dave Martin
On Tue, Jul 07, 2020 at 10:33:50PM +0100, Andrew Scull wrote: > On Tue, Jul 07, 2020 at 05:59:58PM +0100, Dave Martin wrote: > > On Tue, Jul 07, 2020 at 03:57:13PM +0100, Andrew Scull wrote: > > > The FPSIMD registers can be in one of three states: > > > (a) loaded with the user task's state > >

[PATCH] KVM: arm64: Fix definition of PAGE_HYP_DEVICE

2020-07-08 Thread Will Deacon
PAGE_HYP_DEVICE is intended to encode attribute bits for an EL2 stage-1 pte mapping a device. Unfortunately, it includes PROT_DEVICE_nGnRE which encodes attributes for EL1 stage-1 mappings such as UXN and nG, which are RES0 for EL2, and DBM which is meaningless as TCR_EL2.HD is not set. Fix the

Re: [PATCH] arm64: kvm: Stop clobbering x0 for HVC_SOFT_RESTART

2020-07-08 Thread James Morse
Hi Marc, Andrew, On 06/07/2020 11:11, Marc Zyngier wrote: > On 2020-07-06 10:52, Andrew Scull wrote: >> HVC_SOFT_RESTART is given values for x0-2 that it should installed >> before exiting to the new address so should not set x0 to stub HVC >> success or failure code. >> diff --git