Re: [PATCH 0/9] arm64: Stolen time support

2020-07-28 Thread zhukeqian
Hi Steven, On 2020/7/27 18:48, Steven Price wrote: > On 21/07/2020 04:26, zhukeqian wrote: >> Hi Steven, > > Hi Keqian, > >> On 2019/8/2 22:50, Steven Price wrote: >>> This series add support for paravirtualized time for arm64 guests and >>> KVM hosts following the specification in Arm's

Re: [PATCH kvm-unit-tests] arm64: Compile with -mno-outline-atomics

2020-07-28 Thread Paolo Bonzini
On 28/07/20 14:17, Andrew Jones wrote: > GCC 10.1.0 introduced the -moutline-atomics option which, when > enabled, use LSE instructions when the processor provides them. > The option is enabled by default and unfortunately causes the > following error at compile time: > > aarch64-linux-gnu-ld:

Re: [PATCH 1/5] KVM: arm64: pvtime: steal-time is only supported when configured

2020-07-28 Thread Andrew Jones
On Tue, Jul 28, 2020 at 02:13:54PM +0100, Marc Zyngier wrote: > On 2020-07-28 13:55, Andrew Jones wrote: > > On Mon, Jul 27, 2020 at 06:25:50PM +0100, Marc Zyngier wrote: > > > Hi Andrew, > > > > > > On 2020-07-11 11:04, Andrew Jones wrote: > > > > Don't confuse the guest by saying steal-time is

Re: [PATCH 1/5] KVM: arm64: pvtime: steal-time is only supported when configured

2020-07-28 Thread Marc Zyngier
On 2020-07-28 13:55, Andrew Jones wrote: On Mon, Jul 27, 2020 at 06:25:50PM +0100, Marc Zyngier wrote: Hi Andrew, On 2020-07-11 11:04, Andrew Jones wrote: > Don't confuse the guest by saying steal-time is supported when > it hasn't been configured by userspace and won't work. > >

Re: [PATCH 0/5] KVM: arm64: pvtime: Fixes and a new cap

2020-07-28 Thread Andrew Jones
On Mon, Jul 27, 2020 at 07:01:04PM +0100, Marc Zyngier wrote: > On 2020-07-11 11:04, Andrew Jones wrote: > > The first three patches in the series are fixes that come from testing > > and reviewing pvtime code while writing the QEMU support (I'll reply > > to this mail with a link to the QEMU

Re: [PATCH 1/5] KVM: arm64: pvtime: steal-time is only supported when configured

2020-07-28 Thread Andrew Jones
On Mon, Jul 27, 2020 at 06:25:50PM +0100, Marc Zyngier wrote: > Hi Andrew, > > On 2020-07-11 11:04, Andrew Jones wrote: > > Don't confuse the guest by saying steal-time is supported when > > it hasn't been configured by userspace and won't work. > > > > Signed-off-by: Andrew Jones > > --- > >

[PATCH kvm-unit-tests] arm64: Compile with -mno-outline-atomics

2020-07-28 Thread Andrew Jones
GCC 10.1.0 introduced the -moutline-atomics option which, when enabled, use LSE instructions when the processor provides them. The option is enabled by default and unfortunately causes the following error at compile time: aarch64-linux-gnu-ld:

Re: [RESEND PATCH] drivers: arm arch timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-07-28 Thread zhukeqian
Hi Marc, On 2020/7/28 18:16, Marc Zyngier wrote: > On 2020-07-17 10:21, Keqian Zhu wrote: >> ARM virtual counter supports event stream. It can only trigger an event >> when the trigger bit of CNTVCT_EL0 changes from 0 to 1 (or from 1 to 0), >> so the actual period of event stream is 2 ^

Re: [PATCH 0/2] Unify non-VHE ASLR features behind CONFIG_RANDOMIZE_BASE

2020-07-28 Thread Marc Zyngier
On Tue, 21 Jul 2020 10:44:43 +0100, David Brazdil wrote: > There is currently no way to disable nVHE ASLR, e.g. for debugging, so the > first patch in this series makes it conditional on RANDOMIZE_BASE, same as > KASLR. Note that the 'nokaslr' command line flag has no effect here. > > Second

Re: [RESEND PATCH] drivers: arm arch timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-07-28 Thread Marc Zyngier
On 2020-07-17 10:21, Keqian Zhu wrote: ARM virtual counter supports event stream. It can only trigger an event when the trigger bit of CNTVCT_EL0 changes from 0 to 1 (or from 1 to 0), so the actual period of event stream is 2 ^ (cntkctl_evnti + 1). For example, when the trigger bit is 0, then

Re: [PATCH v2] KVM: arm64: Don't inherit exec permission across page-table levels

2020-07-28 Thread Marc Zyngier
On Thu, 23 Jul 2020 11:17:14 +0100, Will Deacon wrote: > If a stage-2 page-table contains an executable, read-only mapping at the > pte level (e.g. due to dirty logging being enabled), a subsequent write > fault to the same page which tries to install a larger block mapping > (e.g. due to dirty

Re: [PATCH v2 0/8] KVM: arm64: Support HW dirty log based on DBM

2020-07-28 Thread zhukeqian
Hi Marc, On 2020/7/28 15:52, Marc Zyngier wrote: > On 2020-07-28 03:11, zhukeqian wrote: >> Hi Marc, > > [...] > >>> But you are still reading the leaf entries of the PTs, hence defeating >>> any sort of prefetch that the CPU could do for you. And my claim is >>> that reading the bitmap is much

[GIT PULL] KVM/arm64 fixes for 5.8, take #4

2020-07-28 Thread Marc Zyngier
Hi Paolo, This is the last batch of fixes for 5.8. One fixes a long standing MMU issue, while the other addresses a more recent brekage with out-of-line helpers in the nVHE code. Please pull, M. The following changes since commit b9e10d4a6c9f5cbe6369ce2c17ebc67d2e5a4be5: KVM: arm64:

[PATCH 2/2] KVM: arm64: Don't inherit exec permission across page-table levels

2020-07-28 Thread Marc Zyngier
From: Will Deacon If a stage-2 page-table contains an executable, read-only mapping at the pte level (e.g. due to dirty logging being enabled), a subsequent write fault to the same page which tries to install a larger block mapping (e.g. due to dirty logging having been disabled) will

[PATCH 1/2] KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions

2020-07-28 Thread Marc Zyngier
So far, vcpu_has_ptrauth() is implemented in terms of system_supports_*_auth() calls, which are declared "inline". In some specific conditions (clang and SCS), the "inline" very much turns into an "out of line", which leads to a fireworks when this predicate is evaluated on a non-VHE system (right

Re: [PATCH v2 0/8] KVM: arm64: Support HW dirty log based on DBM

2020-07-28 Thread Marc Zyngier
On 2020-07-28 03:11, zhukeqian wrote: Hi Marc, [...] But you are still reading the leaf entries of the PTs, hence defeating any sort of prefetch that the CPU could do for you. And my claim is that reading the bitmap is much faster than parsing the PTs. Are you saying that this isn't the

Re: [RESEND PATCH] drivers: arm arch timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-07-28 Thread zhukeqian
Friendly ping. Is this an effective bugfix? On 2020/7/17 17:21, Keqian Zhu wrote: > ARM virtual counter supports event stream. It can only trigger an event > when the trigger bit of CNTVCT_EL0 changes from 0 to 1 (or from 1 to 0), > so the actual period of event stream is 2 ^ (cntkctl_evnti + 1).