[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] Implement PMULL using host intrinsics
From: |
Ard Biesheuvel |
Subject: |
[PATCH 0/2] Implement PMULL using host intrinsics |
Date: |
Thu, 1 Jun 2023 14:33:30 +0200 |
Another set of RFC patches - this time for 64x64->128 polynomial
multiplication. Playing round with this on top of the AES changes I sent
out earlier this week, I noticed that the speedup is rather substantial.
PMULL is relevant for GCM encryption, which combines AES in counter mode
with GHASH, which is based on multiplication in GF(2^128). The
significance of PMULL to this encryption mode is basically why PMULL is
part of the AES crypto extension on AArch64.
Note that user emulation on a AArch64 host of x86 binaries that perform
any kind of HTTPS communication under the hood would likely benefit from
this.
Again, this approach is likely too ad-hoc, but it helps span the space
of what we might want to cover in terms of host acceleration API. (I'm
not a TCG expert, but I guess this raises the question what to cover in
helpers and what to cover using native TCG ops?)
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Ard Biesheuvel (2):
target/arm: Use x86 intrinsics to implement PMULL.P64
target/i386: Implement PCLMULQDQ using AArch64 PMULL instructions
host/include/aarch64/host/cpuinfo.h | 1 +
host/include/i386/host/cpuinfo.h | 1 +
target/arm/tcg/vec_helper.c | 26 +++++++++++++++++++-
target/i386/ops_sse.h | 24 ++++++++++++++++++
util/cpuinfo-aarch64.c | 1 +
util/cpuinfo-i386.c | 1 +
6 files changed, 53 insertions(+), 1 deletion(-)
--
2.39.2
- [PATCH 0/2] Implement PMULL using host intrinsics,
Ard Biesheuvel <=