Re: [PATCH v3 08/18] arm/arm64: KVM: Add PSCI version selection API

2018-02-02 Thread Andrew Jones
On Thu, Feb 01, 2018 at 11:46:47AM +, Marc Zyngier wrote: > Although we've implemented PSCI 1.0 and 1.1, nothing can select them > Since all the new PSCI versions are backward compatible, we decide to > default to the latest version of the PSCI implementation. This is no > different from doing

Re: [PATCH 1/2] ARM: kvm: fix building with gcc-8

2018-02-02 Thread Robin Murphy
On 02/02/18 16:29, Arnd Bergmann wrote: On Fri, Feb 2, 2018 at 5:23 PM, Robin Murphy wrote: On 02/02/18 15:55, Robin Murphy wrote: On 02/02/18 15:07, Arnd Bergmann wrote: In banked-sr.c, we use a top-level '__asm__(".arch_extension virt")' statement to allow

Re: [PATCH 1/2] ARM: kvm: fix building with gcc-8

2018-02-02 Thread Arnd Bergmann
On Fri, Feb 2, 2018 at 5:23 PM, Robin Murphy wrote: > On 02/02/18 15:55, Robin Murphy wrote: >> >> On 02/02/18 15:07, Arnd Bergmann wrote: >>> >>> In banked-sr.c, we use a top-level '__asm__(".arch_extension virt")' >>> statement to allow compilation of a multi-CPU kernel

Re: [PATCH 1/2] ARM: kvm: fix building with gcc-8

2018-02-02 Thread Robin Murphy
On 02/02/18 15:55, Robin Murphy wrote: On 02/02/18 15:07, Arnd Bergmann wrote: In banked-sr.c, we use a top-level '__asm__(".arch_extension virt")' statement to allow compilation of a multi-CPU kernel for ARMv6 and older ARMv7-A that don't normally support access to the banked registers. This

Re: [PATCH 1/2] ARM: kvm: fix building with gcc-8

2018-02-02 Thread Robin Murphy
On 02/02/18 15:07, Arnd Bergmann wrote: In banked-sr.c, we use a top-level '__asm__(".arch_extension virt")' statement to allow compilation of a multi-CPU kernel for ARMv6 and older ARMv7-A that don't normally support access to the banked registers. This is considered to be a programming error

[PATCH 1/2] ARM: kvm: fix building with gcc-8

2018-02-02 Thread Arnd Bergmann
In banked-sr.c, we use a top-level '__asm__(".arch_extension virt")' statement to allow compilation of a multi-CPU kernel for ARMv6 and older ARMv7-A that don't normally support access to the banked registers. This is considered to be a programming error by the gcc developers and will no longer

Re: [PATCH v3 18/18] arm64: Kill PSCI_GET_VERSION as a variant-2 workaround

2018-02-02 Thread Marc Zyngier
On 02/02/18 04:05, Hanjun Guo wrote: > Hi Marc, > > Thank you for keeping me in the loop, just minor comments below. > > On 2018/2/1 19:46, Marc Zyngier wrote: >> Now that we've standardised on SMCCC v1.1 to perform the branch >> prediction invalidation, let's drop the previous band-aid. >> If

Re: [PATCH v3 07/18] arm/arm64: KVM: Implement PSCI 1.0 support

2018-02-02 Thread Christoffer Dall
On Thu, Feb 01, 2018 at 11:46:46AM +, Marc Zyngier wrote: > PSCI 1.0 can be trivially implemented by having PSCI 0.2 and > the FEATURES call. Of, and returning 1.0 as the PSCI version. Of? (Oh ?) > > We happily ignore everything else, as it is optional. nit: Might be worth mentioning that

Re: [PATCH v3 06/18] arm/arm64: KVM: Add smccc accessors to PSCI code

2018-02-02 Thread Christoffer Dall
On Thu, Feb 01, 2018 at 11:46:45AM +, Marc Zyngier wrote: > Instead of open coding the accesses to the various registers, > let's add explicit SMCCC accessors. > Reviewed-by: Christoffer Dall > Signed-off-by: Marc Zyngier > --- >

Re: [PATCH v3 03/18] arm64: KVM: Increment PC after handling an SMC trap

2018-02-02 Thread Christoffer Dall
On Thu, Feb 01, 2018 at 11:46:42AM +, Marc Zyngier wrote: > When handling an SMC trap, the "preferred return address" is set > to that of the SMC, and not the next PC (which is a departure from > the behaviour of an SMC that isn't trapped). > > Increment PC in the handler, as the guest is

Re: [PATCH v3 05/18] arm/arm64: KVM: Add PSCI_VERSION helper

2018-02-02 Thread Christoffer Dall
On Thu, Feb 01, 2018 at 11:46:44AM +, Marc Zyngier wrote: > As we're about to trigger a PSCI version explosion, it doesn't > hurt to introduce a PSCI_VERSION helper that is going to be > used everywhere. > Reviewed-by: Christoffer Dall > Signed-off-by: Marc

Re: [PATCH v3 04/18] arm/arm64: KVM: Consolidate the PSCI include files

2018-02-02 Thread Christoffer Dall
On Thu, Feb 01, 2018 at 11:46:43AM +, Marc Zyngier wrote: > As we're about to update the PSCI support, and because I'm lazy, > let's move the PSCI include file to include/kvm so that both > ARM architectures can find it. > Acked-by: Christoffer Dall >

Re: [PATCH v3 00/41] Optimize KVM/ARM for VHE systems

2018-02-02 Thread Tomasz Nowicki
On 01.02.2018 14:57, Tomasz Nowicki wrote: Hi Christoffer, I created simple module for VM kernel. It is spinning on PSCI version hypercall to measure the base exit cost as you suggested. Also, I measured CPU cycles for each loop and here are my results: My setup: 1-socket ThunderX2 running

Re: [PATCH v3 00/41] Optimize KVM/ARM for VHE systems

2018-02-02 Thread Tomasz Nowicki
On 01.02.2018 17:15, Yury Norov wrote: On Thu, Feb 01, 2018 at 02:57:59PM +0100, Tomasz Nowicki wrote: Hi Christoffer, I created simple module for VM kernel. It is spinning on PSCI version hypercall to measure the base exit cost as you suggested. Also, I measured CPU cycles for each loop and