All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/16] KVM: arm64: Optimise FPSIMD context switching
@ 2018-05-09 16:12 ` Dave Martin
  0 siblings, 0 replies; 76+ messages in thread
From: Dave Martin @ 2018-05-09 16:12 UTC (permalink / raw)
  To: kvmarm
  Cc: linux-arm-kernel, Christoffer Dall, Marc Zyngier, Ard Biesheuvel,
	Catalin Marinas, linux-arch, linux-kernel, Ingo Molnar,
	Peter Zijlstra, Steven Rostedt, Oleg Nesterov

Note: Most of these patches are Arm-specific.  People not Cc'd on the
whole series can find it in the linux-arm-kernel archive [2].

This series aims to improve the way FPSIMD context is handled by KVM.
Only minor changes have been made since the previous v6 [1], though
this posting does apply a couple of fixes.

The changes are summarised in the individual patches.

Reviewers please note:

 * Patch 6 is new, and does some minor refactoring to help fix an SVE
   context switching issue on the host, observed during stress-testing
   of v6 on an SVE-enabled model (the actual fix, using this
   refactoring, is incorporated in patch 8).

 * Patch 8 is missing Reviewed-bys/Acked-bys (thanks Marc, but I
   stripped yours in the end due to nontrivial changes.  Reviewer
   attention on these patches would be much appreciated.

Some testing done on Juno and the Arm fast model (arm64), including
combinations of (non-)SVE and (non-)VHE configurations.

Cheers
---Dave

[1] [PATCH v6 00/15] KVM: arm64: Optimise FPSIMD context switching
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/576355.html

[2] linux-arm-kernel archive
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/thread.html


Christoffer Dall (1):
  KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change

Dave Martin (15):
  thread_info: Add update_thread_flag() helpers
  arm64: Use update{,_tsk}_thread_flag()
  KVM: arm64: Convert lazy FPSIMD context switch trap to C
  arm64: fpsimd: Generalise context saving for non-task contexts
  arm64/sve: Refactor user SVE trap maintenance for external use
  KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags
  KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing
  arm64/sve: Move read_zcr_features() out of cpufeature.h
  arm64/sve: Switch sve_pffr() argument from task to thread
  arm64/sve: Move sve_pffr() to fpsimd.h and make inline
  KVM: arm64: Save host SVE context as appropriate
  KVM: arm64: Remove eager host SVE state saving
  KVM: arm64: Remove redundant *exit_code changes in fpsimd_guest_exit()
  KVM: arm64: Fold redundant exit code checks out of fixup_guest_exit()
  KVM: arm64: Invoke FPSIMD context switch trap from C

 arch/arm/include/asm/kvm_host.h     |   9 ++-
 arch/arm64/Kconfig                  |   7 ++
 arch/arm64/include/asm/cpufeature.h |  29 -------
 arch/arm64/include/asm/fpsimd.h     |  21 +++++
 arch/arm64/include/asm/kvm_asm.h    |   3 -
 arch/arm64/include/asm/kvm_host.h   |  32 +++++---
 arch/arm64/include/asm/processor.h  |   2 +
 arch/arm64/kernel/fpsimd.c          | 148 ++++++++++++++++++------------------
 arch/arm64/kernel/ptrace.c          |   1 +
 arch/arm64/kvm/Kconfig              |   1 +
 arch/arm64/kvm/Makefile             |   2 +-
 arch/arm64/kvm/debug.c              |   8 +-
 arch/arm64/kvm/fpsimd.c             | 111 +++++++++++++++++++++++++++
 arch/arm64/kvm/hyp/debug-sr.c       |   6 +-
 arch/arm64/kvm/hyp/entry.S          |  43 -----------
 arch/arm64/kvm/hyp/hyp-entry.S      |  19 -----
 arch/arm64/kvm/hyp/switch.c         | 124 +++++++++++++++++++++---------
 arch/arm64/kvm/hyp/sysreg-sr.c      |   4 +-
 arch/arm64/kvm/sys_regs.c           |   9 +--
 include/linux/kvm_host.h            |   9 +++
 include/linux/sched.h               |   6 ++
 include/linux/thread_info.h         |  11 +++
 virt/kvm/Kconfig                    |   3 +
 virt/kvm/arm/arm.c                  |  25 +++++-
 virt/kvm/kvm_main.c                 |   7 +-
 25 files changed, 405 insertions(+), 235 deletions(-)
 create mode 100644 arch/arm64/kvm/fpsimd.c

-- 
2.1.4

^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2018-05-15 12:48 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 16:12 [PATCH v7 00/16] KVM: arm64: Optimise FPSIMD context switching Dave Martin
2018-05-09 16:12 ` Dave Martin
2018-05-09 16:12 ` [PATCH v7 01/16] thread_info: Add update_thread_flag() helpers Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-10 16:15   ` Catalin Marinas
2018-05-10 16:15     ` Catalin Marinas
2018-05-09 16:12 ` [PATCH v7 02/16] arm64: Use update{,_tsk}_thread_flag() Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:17   ` Will Deacon
2018-05-09 16:17     ` Will Deacon
2018-05-09 16:27     ` Dave Martin
2018-05-09 16:27       ` Dave Martin
2018-05-09 16:55       ` Marc Zyngier
2018-05-09 16:55         ` Marc Zyngier
2018-05-09 17:08         ` Dave Martin
2018-05-09 17:08           ` Dave Martin
2018-05-10 16:16   ` Catalin Marinas
2018-05-10 16:16     ` Catalin Marinas
2018-05-09 16:12 ` [PATCH v7 03/16] KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:12 ` [PATCH v7 04/16] KVM: arm64: Convert lazy FPSIMD context switch trap to C Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:12 ` [PATCH v7 05/16] arm64: fpsimd: Generalise context saving for non-task contexts Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-10 16:17   ` Catalin Marinas
2018-05-10 16:17     ` Catalin Marinas
2018-05-09 16:12 ` [PATCH v7 06/16] arm64/sve: Refactor user SVE trap maintenance for external use Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:36   ` Marc Zyngier
2018-05-09 16:36     ` Marc Zyngier
2018-05-09 16:41     ` Dave Martin
2018-05-09 16:41       ` Dave Martin
2018-05-09 16:47       ` Marc Zyngier
2018-05-09 16:47         ` Marc Zyngier
2018-05-10 16:41   ` Catalin Marinas
2018-05-10 16:41     ` Catalin Marinas
2018-05-09 16:12 ` [PATCH v7 07/16] KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-15 10:55   ` Christoffer Dall
2018-05-15 10:55     ` Christoffer Dall
2018-05-09 16:12 ` [PATCH v7 08/16] KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:54   ` Marc Zyngier
2018-05-09 16:54     ` Marc Zyngier
2018-05-09 17:00     ` Dave Martin
2018-05-09 17:00       ` Dave Martin
2018-05-10 16:44   ` Catalin Marinas
2018-05-10 16:44     ` Catalin Marinas
2018-05-15 10:55   ` Christoffer Dall
2018-05-15 10:55     ` Christoffer Dall
2018-05-15 12:48     ` Dave Martin
2018-05-15 12:48       ` Dave Martin
2018-05-09 16:12 ` [PATCH v7 09/16] arm64/sve: Move read_zcr_features() out of cpufeature.h Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:12 ` [PATCH v7 10/16] arm64/sve: Switch sve_pffr() argument from task to thread Dave Martin
2018-05-09 16:12   ` Dave Martin
2018-05-09 16:13 ` [PATCH v7 11/16] arm64/sve: Move sve_pffr() to fpsimd.h and make inline Dave Martin
2018-05-09 16:13   ` Dave Martin
2018-05-09 16:13 ` [PATCH v7 12/16] KVM: arm64: Save host SVE context as appropriate Dave Martin
2018-05-09 16:13   ` Dave Martin
2018-05-10 16:52   ` Catalin Marinas
2018-05-10 16:52     ` Catalin Marinas
2018-05-09 16:13 ` [PATCH v7 13/16] KVM: arm64: Remove eager host SVE state saving Dave Martin
2018-05-09 16:13   ` Dave Martin
2018-05-10 16:53   ` Catalin Marinas
2018-05-10 16:53     ` Catalin Marinas
2018-05-09 16:13 ` [PATCH v7 14/16] KVM: arm64: Remove redundant *exit_code changes in fpsimd_guest_exit() Dave Martin
2018-05-09 16:13   ` Dave Martin
2018-05-15 10:46   ` Christoffer Dall
2018-05-15 10:46     ` Christoffer Dall
2018-05-09 16:13 ` [PATCH v7 15/16] KVM: arm64: Fold redundant exit code checks out of fixup_guest_exit() Dave Martin
2018-05-09 16:13   ` Dave Martin
2018-05-09 16:13 ` [PATCH v7 16/16] KVM: arm64: Invoke FPSIMD context switch trap from C Dave Martin
2018-05-09 16:13   ` Dave Martin
2018-05-15 10:57   ` Christoffer Dall
2018-05-15 10:57     ` Christoffer Dall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.