qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/18] target/i386: implement SHA instructions


From: Richard Henderson
Subject: Re: [PATCH 03/18] target/i386: implement SHA instructions
Date: Wed, 18 Oct 2023 17:25:57 -0700
User-agent: Mozilla Thunderbird

On 10/14/23 03:01, Paolo Bonzini wrote:
The implementation was validated with OpenSSL and with the test vectors in
https://github.com/rust-lang/stdarch/blob/master/crates/core_arch/src/x86/sha.rs.

The instructions provide a ~25% improvement on hashing a 64 MiB file:
runtime goes down from 1.8 seconds to 1.4 seconds; instruction count on
the host goes down from 5.8 billion to 4.8 billion with slightly better
IPC too.  Good job Intel. ;)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  target/i386/cpu.c                    |   2 +-
  target/i386/ops_sse.h                | 128 +++++++++++++++++++++++++++
  target/i386/tcg/decode-new.c.inc     |  11 +++
  target/i386/tcg/decode-new.h         |   1 +
  target/i386/tcg/emit.c.inc           |  54 +++++++++++
  target/i386/tcg/ops_sse_header.h.inc |  14 +++
  6 files changed, 209 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

I don't immediately see anything that could be shared with arm and riscv, to be abstracted akin to include/crypto/aes-round.h. But there's probably something there somewhere.

Something for later...


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]