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

Re: [Xen-devel] [PATCH v8 49/50] x86emul: add a SHA test case to the harness



>>> On 21.06.19 at 15:51, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 15/03/2019 11:08, Jan Beulich wrote:
>> +        /*
>> +         * SHA256RNDS2
>> +         *
>> +         * SRC1 = { C0, D0, G0, H0 }
>> +         * SRC2 = { A0, B0, E0, F0 }
>> +         * XMM0 = W' = { ?, ?, WK1, WK0 }
>> +         *
>> +         * (NB that the notation again is not C-like, i.e. elements are 
>> listed
>> +         * high-to-low everywhere in this comment.)
>> +         *
>> +         * Ch(E,F,G) = (E & F) ^ (~E & G)
>> +         * Maj(A,B,C) = (A & B) ^ (A & C) ^ (B & C)
>> +         *
>> +         * Σ0(A) = ROR2(A) ^ ROR13(A) ^ ROR22(A)
>> +         * Σ1(E) = ROR6(E) ^ ROR11(E) ^ ROR25(E)
> 
> This looks like some encoding problems (and later on in the comment).  I
> can't tell whether it is a consequence of the email or something present
> in the underlying patch. 

Oh - I forgot to properly enforce UTF8 while composing the mail.
This is what it'll looks like when committed:

        /*
         * SHA256RNDS2
         *
         * SRC1 = { C0, D0, G0, H0 }
         * SRC2 = { A0, B0, E0, F0 }
         * XMM0 = W' = { ?, ?, WK1, WK0 }
         *
         * (NB that the notation again is not C-like, i.e. elements are listed
         * high-to-low everywhere in this comment.)
         *
         * Ch(E,F,G) = (E & F) ^ (~E & G)
         * Maj(A,B,C) = (A & B) ^ (A & C) ^ (B & C)
         *
         * Σ0(A) = ROR2(A) ^ ROR13(A) ^ ROR22(A)
         * Σ1(E) = ROR6(E) ^ ROR11(E) ^ ROR25(E)

>> +static bool simd_check_avx_sha(void)
>> +{
>> +    return cpu_has_sha && cpu_has_avx;
> 
> I can't locate any [E]VEX encoding information for the SHA
> instructions.  Is this a side effect of the rest of the test algorithm,
> or am I missing something in the manual?

There are only legacy forms as of now. Note the single sentence in
the commit message:

"Also use this for AVX512VL VPRO{L,R}{,V}D as well as some further shifts
 testing."

The AVX and AVX512F flavors of the test are good test cases for other
insns; they are still only utilizing legacy encoded SHA insns.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.