kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Kristina Martsenko <kristina.martsenko@arm.com>
To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Cc: Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Vladimir Murzin <vladimir.murzin@arm.com>,
	Colton Lewis <coltonlewis@google.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] KVM: arm64: Support for Arm v8.8 memcpy instructions in KVM guests
Date: Fri, 15 Sep 2023 13:48:37 +0100	[thread overview]
Message-ID: <20230915124840.474888-1-kristina.martsenko@arm.com> (raw)

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


             reply	other threads:[~2023-09-15 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 12:48 Kristina Martsenko [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230915124840.474888-1-kristina.martsenko@arm.com \
    --to=kristina.martsenko@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=coltonlewis@google.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).