linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: arm64: Support for Arm v8.8 memcpy instructions in KVM guests
@ 2023-09-15 12:48 Kristina Martsenko
  2023-09-15 12:48 ` [PATCH 1/3] KVM: arm64: Configure HCRX_EL2 dynamically Kristina Martsenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kristina Martsenko @ 2023-09-15 12:48 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel
  Cc: Marc Zyngier, Oliver Upton, James Morse, Suzuki K Poulose,
	Zenghui Yu, Catalin Marinas, Will Deacon, Vladimir Murzin,
	Colton Lewis, linux-kernel

Hi,

This series adds support for using the new Arm memory copy instructions in KVM
guests.  A previous series [1] added support for using the instructions in
userspace applications.  Similarly to that series, the main thing to note here
is the handling for when a memcpy is stopped and continued on a different type
of CPU. See patch #2 for details.

As background, the Armv8.8 extension adds new instructions to perform memcpy(),
memset() and memmove() operations in hardware (FEAT_MOPS).  The aim is to avoid
having many different performance-optimal memcpy implementations in software
(tailored to CPU model and copy size) and the overhead of selecting between
them.  The new instructions are intended to be at least as fast as any
alternative instruction sequence.

The series has been tested on the Arm FVP.

Thanks,
Kristina

[1] https://lore.kernel.org/all/20230509142235.3284028-1-kristina.martsenko@arm.com/


Kristina Martsenko (3):
  KVM: arm64: Configure HCRX_EL2 dynamically
  KVM: arm64: Add handler for MOPS exceptions
  KVM: arm64: Expose MOPS instructions to guests

 arch/arm64/include/asm/kvm_emulate.h          | 10 ++++
 arch/arm64/include/asm/kvm_host.h             |  1 +
 arch/arm64/include/asm/traps.h                | 54 ++++++++++++++++++-
 arch/arm64/kernel/traps.c                     | 48 +----------------
 arch/arm64/kvm/arm.c                          |  1 +
 arch/arm64/kvm/hyp/include/hyp/switch.h       | 19 ++++++-
 .../arm64/kvm/hyp/include/nvhe/fixed_config.h |  3 +-
 arch/arm64/kvm/hyp/nvhe/hyp-main.c            |  1 +
 arch/arm64/kvm/hyp/nvhe/pkvm.c                |  1 +
 arch/arm64/kvm/hyp/nvhe/switch.c              |  2 +
 arch/arm64/kvm/hyp/vhe/switch.c               |  1 +
 arch/arm64/kvm/sys_regs.c                     |  1 -
 12 files changed, 90 insertions(+), 52 deletions(-)


base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-09-19 11:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15 12:48 [PATCH 0/3] KVM: arm64: Support for Arm v8.8 memcpy instructions in KVM guests Kristina Martsenko
2023-09-15 12:48 ` [PATCH 1/3] KVM: arm64: Configure HCRX_EL2 dynamically Kristina Martsenko
2023-09-18 11:10   ` Marc Zyngier
2023-09-19 11:26     ` Kristina Martsenko
2023-09-15 12:48 ` [PATCH 2/3] KVM: arm64: Add handler for MOPS exceptions Kristina Martsenko
2023-09-15 12:48 ` [PATCH 3/3] KVM: arm64: Expose MOPS instructions to guests Kristina Martsenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).