Re: [RFC PATCH 0/4] Add support for ARMv8.6 TWED feature

2020-11-12 Thread Jingyi Wang
Hi all, Sorry for the delay. I have been testing the TWED feature performance lately. We select unixbench as the benchmark for some items of it is lock-intensive(fstime/fsbuffer/fsdisk). We run unixbench on a 4-VCPU VM, and bind every two VCPUs on one PCPU. Fixed TWED value is used and here is

[PATCH 0/3] KVM/arm64 fixes for 5.10, take #3

2020-11-12 Thread Marc Zyngier
Paolo, Here's another small set of fixes for 5.10, this time fixing some corner cases of the Spectre mitigation rework. Note that I had to pull 5.10-rc1 into kvmarm/next in order to avoid some annoying conflicts. Please pull, M. The following changes since commit 4f6b838c378a52ea3ae0b15

[PATCH 1/3] KVM: arm64: Allow setting of ID_AA64PFR0_EL1.CSV2 from userspace

2020-11-12 Thread Marc Zyngier
We now expose ID_AA64PFR0_EL1.CSV2=1 to guests running on hosts that are immune to Spectre-v2, but that don't have this field set, most likely because they predate the specification. However, this prevents the migration of guests that have started on a host the doesn't fake this CSV2 setting to on

[PATCH 3/3] KVM: arm64: Handle SCXTNUM_ELx traps

2020-11-12 Thread Marc Zyngier
As the kernel never sets HCR_EL2.EnSCXT, accesses to SCXTNUM_ELx will trap to EL2. Let's handle that as gracefully as possible by injecting an UNDEF exception into the guest. This is consistent with the guest's view of ID_AA64PFR0_EL1.CSV2 being at most 1. Signed-off-by: Marc Zyngier Acked-by: Wi

[PATCH 2/3] KVM: arm64: Unify trap handlers injecting an UNDEF

2020-11-12 Thread Marc Zyngier
A large number of system register trap handlers only inject an UNDEF exeption, and yet each class of sysreg seems to provide its own, identical function. Let's unify them all, saving us introducing yet another one later. Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kerne

Re: [PATCH v2 4/5] arm64: Add support for SMCCC TRNG entropy source

2020-11-12 Thread André Przywara
On 05/11/2020 14:38, Mark Rutland wrote: Hi, > On Thu, Nov 05, 2020 at 02:29:49PM +, Mark Brown wrote: >> On Thu, Nov 05, 2020 at 02:03:22PM +, Mark Rutland wrote: >>> On Thu, Nov 05, 2020 at 01:41:42PM +, Mark Brown wrote: >> It isn't obvious to me why we don't fall through to t

Re: [PATCH v2 7/9] KVM: arm64: Allocate hyp vectors statically

2020-11-12 Thread Will Deacon
On Thu, Nov 12, 2020 at 12:05:54PM +, Marc Zyngier wrote: > On 2020-11-09 21:47, Will Deacon wrote: > > The EL2 vectors installed when a guest is running point at one of the > > following configurations for a given CPU: > > > > - Straight at __kvm_hyp_vector > > - A trampoline containing a

Re: [PATCH v2 7/9] KVM: arm64: Allocate hyp vectors statically

2020-11-12 Thread Marc Zyngier
On 2020-11-09 21:47, Will Deacon wrote: The EL2 vectors installed when a guest is running point at one of the following configurations for a given CPU: - Straight at __kvm_hyp_vector - A trampoline containing an SMC sequence to mitigate Spectre-v2 and then a direct branch to __kvm_hyp_ve

Re: [PATCH v2 7/9] KVM: arm64: Allocate hyp vectors statically

2020-11-12 Thread Will Deacon
On Thu, Nov 12, 2020 at 11:07:55AM +, Marc Zyngier wrote: > On 2020-11-09 21:47, Will Deacon wrote: > > The EL2 vectors installed when a guest is running point at one of the > > following configurations for a given CPU: > > > > - Straight at __kvm_hyp_vector > > - A trampoline containing a

Re: [PATCH v2 7/9] KVM: arm64: Allocate hyp vectors statically

2020-11-12 Thread Marc Zyngier
On 2020-11-09 21:47, Will Deacon wrote: The EL2 vectors installed when a guest is running point at one of the following configurations for a given CPU: - Straight at __kvm_hyp_vector - A trampoline containing an SMC sequence to mitigate Spectre-v2 and then a direct branch to __kvm_hyp_ve