Hi,

> -----Original Message-----
> From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-
> [email protected]] On Behalf Of Andrew Haley
> Sent: Tuesday, September 29, 2020 5:25 PM
> To: [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: RFR: 8252204: AArch64: Implement SHA3 accelerator/intrinsic
> 
> On Thu, 17 Sep 2020 06:03:57 GMT, Ard Biesheuvel
> <[email protected]> wrote:
> 
> >> @ardbiesheuvel : Ard, could you please ack this patch? Thanks.
> >
> > Acked-by: Ard Biesheuvel <[email protected]>
> 
> > If this feature is not auto-enabled when the SHA3 hardware feature is
> > there, we will have one failure for the following
> > test:
> > test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOp
> > tionOnSupportedCPU.java
> > 15 #-----testresult-----
> > 16
> > description=file:/home/yangfei/github/jdk/test/hotspot/jtreg/compiler/
> > intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java
> > 17 elapsed=31546 0:00:31.546 18 end=Mon Sep 21 10:27:58 CST 2020
> > 19 environment=regtest
> > 20 execStatus=Failed. Execution failed: `main' threw exception:
> > java.lang.AssertionError: Option 'UseSHA3Intrinsics' is expected to
> > have 'true' value Option 'UseSHA3Intrinsics' should be enabled by default
> Any suggestions for this?
> 
> I don't understand your question. There should be two acceptable results,
> either "Pass" or "Not supported". What else is possible?

This new test is similar to existing test cases in the same directory like: 
TestUseSHA256IntrinsicsOptionOnSupportedCPU.java
Currently, we ran this new test using QEMU which supports the aarch64 SHA3 
feature.
This new test is expecting option 'UseSHA3Intrinsics' to be auto-enabled by the 
JVM when it detects the availability of SHA3 feature.
But that was not satisfied since we explicitly disable this option even when 
SHA3 feature is available.

+  if (UseSHA && (_features & CPU_SHA3)) {
+    // Do not auto-enable UseSHA3Intrinsics until it has been fully tested on 
hardware
+    // if (FLAG_IS_DEFAULT(UseSHA3Intrinsics)) {
+      // FLAG_SET_DEFAULT(UseSHA3Intrinsics, true);
+    // }

So I could thought of several choices:
1. Do not add this new test for now;
2. Keep this new test and add on extra requirement for it: @requires 
os.arch!="aarch64"; (We could remove this when UseSHA3Intrinsics has been fully 
tested on real hardware and thus could be auto-enabled.)
3. Auto-enable UseSHA3Intrinsics when SHA3 feature is available for now;

Is there a better way?

Thanks,
Felix

Reply via email to