Re: kvm_read_guest_page() missing kvm->srcu read lock?

2018-05-10 Thread Paolo Bonzini
On 10/05/2018 19:41, Andre Przywara wrote: > Hi, > > Jan posted an lockdep splat complaining about a suspicious > rcu_dereference_check: > https://lists.cs.columbia.edu/pipermail/kvmarm/2018-May/031116.html > > The gist of that is: > ... > [ 1025.695517] dump_stack+0x9c/0xd4 > [ 1025.695524]

kvm_read_guest_page() missing kvm->srcu read lock?

2018-05-10 Thread Andre Przywara
Hi, Jan posted an lockdep splat complaining about a suspicious rcu_dereference_check: https://lists.cs.columbia.edu/pipermail/kvmarm/2018-May/031116.html The gist of that is: ... [ 1025.695517] dump_stack+0x9c/0xd4 [ 1025.695524] lockdep_rcu_suspicious+0xcc/0x118 [ 1025.695537]

Re: [PATCH v7 13/16] KVM: arm64: Remove eager host SVE state saving

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:13:02PM +0100, Dave P Martin wrote: > Now that the host SVE context can be saved on demand from Hyp, > there is no longer any need to save this state in advance before > entering the guest. > > This patch removes the relevant call to > kvm_fpsimd_flush_cpu_state(). > >

Re: [PATCH v7 12/16] KVM: arm64: Save host SVE context as appropriate

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:13:01PM +0100, Dave P Martin wrote: > This patch adds SVE context saving to the hyp FPSIMD context switch > path. This means that it is no longer necessary to save the host > SVE state in advance of entering the guest, when in use. > > In order to avoid adding

Re: [PATCH v7 08/16] KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:12:57PM +0100, Dave P Martin wrote: > This patch refactors KVM to align the host and guest FPSIMD > save/restore logic with each other for arm64. This reduces the > number of redundant save/restore operations that must occur, and > reduces the common-case IRQ blackout

Re: [PATCH] kvm: Change return type to vm_fault_t

2018-05-10 Thread Paolo Bonzini
On 18/04/2018 21:19, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type. > > commit

Re: [PATCH v7 06/16] arm64/sve: Refactor user SVE trap maintenance for external use

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:12:55PM +0100, Dave P Martin wrote: > In preparation for optimising the way KVM manages switching the > guest and host FPSIMD state, it is necessary to provide a means for > code outside arch/arm64/kernel/fpsimd.c to restore the user trap > configuration for SVE

Re: [PATCH v7 05/16] arm64: fpsimd: Generalise context saving for non-task contexts

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:12:54PM +0100, Dave P Martin wrote: > In preparation for allowing non-task (i.e., KVM vcpu) FPSIMD > contexts to be handled by the fpsimd common code, this patch adapts > task_fpsimd_save() to save back the currently loaded context, > removing the explicit dependency on

Re: [PATCH v7 02/16] arm64: Use update{,_tsk}_thread_flag()

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:12:51PM +0100, Dave P Martin wrote: > This patch uses the new update_thread_flag() helpers to simplify a > couple of if () set; else clear; constructs. > > No functional change. > > Signed-off-by: Dave Martin > Acked-by: Marc Zyngier

Re: [PATCH v7 01/16] thread_info: Add update_thread_flag() helpers

2018-05-10 Thread Catalin Marinas
On Wed, May 09, 2018 at 05:12:50PM +0100, Dave P Martin wrote: > There are a number of bits of code sprinkled around the kernel to > set a thread flag if a certain condition is true, and clear it > otherwise. > > To help make those call sites terser and less cumbersome, this > patch adds a new

Re: [PATCH] kvm: Change return type to vm_fault_t

2018-05-10 Thread Souptick Joarder
On Thu, Apr 19, 2018 at 7:26 PM, Cornelia Huck wrote: > On Thu, 19 Apr 2018 00:49:58 +0530 > Souptick Joarder wrote: > >> Use new return type vm_fault_t for fault handler. For >> now, this is just documenting that the function returns >> a VM_FAULT value

[PATCHv2] ARM64: KVM: use lm_alias() for kvm_ksym_ref()

2018-05-10 Thread Mark Rutland
For historical reasons, we open-code lm_alias() in kvm_ksym_ref(). Let's use lm_alias() to avoid duplication and make things clearer. As we have to pull this from (which is not safe for inclusion in assembly), we may as well move the kvm_ksym_ref() definition into the existing !__ASSEMBLY__