From nobody Tue Apr 25 17:42:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q5Tq91T9cz46Ttn; Tue, 25 Apr 2023 17:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q5Tq912PMz45dY; Tue, 25 Apr 2023 17:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682444565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GhGJibY/oMVguvVEjLLjaUjG/ds8wXyCn3VU0T9kQo=; b=FsZ3m0cxAD0u0fw/Nar7DXNZQQcbaL9yL9xebG45LPgd3pfPU0Ibjt+wYAQ4NiW+5txPVu xIJzpC8q49Uq/4GCX73B1Ium1e+A7ORtfcXEO1q6erKo6S9f8MJSC1LmlupwQA/iq55vDp 4gD5HSTM02JwJIcXmmBH0OOrRn5dGzUGmOY0fm/qd/1ARGazicWui2z1MyepeB2Ac8GZYJ FnWBnaq0/VIrzj+tfc3dDLmHwfHFZr4sVrwcih6NYo4MWqbnMOD7pjbUf/DoJndWgSzWIF Ec5DWNJGFmxCyML8RE4YDwE3cjAx1ido5b8gEkJSPy/mPu8zZmjQSlCDBP1GGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682444565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GhGJibY/oMVguvVEjLLjaUjG/ds8wXyCn3VU0T9kQo=; b=ip+eW3PCns21VgRt2sk/TFfGdLDa8O7MYkgfevtPNb4X3U2uwQPAl3RQJlv6X3pxHmcgDC 8oIz1dl/idz+6e2MDf7PLxckXQioC41T1biDeoCbVWUIDpuC7z9Hy+6F+j5KcdQL1157oX kb5czCvUWoNUCvLBIo+TgOKCgjryU9Oq1TjMZ29+Jb9rVBj2zMJAQgQIfg02w6Fa+hvgmh 8GGZJu6VzPGowKTP79MYHTdcSGxunxShaavo515Z59rX3GZU9QbuwRwGMWpHjMe5tHtywY 5PW03SrDEomFjkO9DFMf7z4zXyp2Y5gvt7gnsEZSTukZNTNOwJyt0Cej6ylGZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682444565; a=rsa-sha256; cv=none; b=GOqkWK+whfvXWitTr/7+mxCttGwu1eXKQgn/oTFxgtcQDzHPdYbh0Mdbo97IhAabBg1y0o rzaD0sSz3vwQIeaSVHaxMhL4YZkuB6MbvHEyj2QApk6HQIv57twrsFRfF6iA7zO3J0spiV TOjxvAV5lbKhw2SX8nlacY9gcjP0jSsAVJa9DwgcvsaMu/8GgiqFeWP7H+WLzI5h6k+MZM tJcovA3aYGfSXI6AZXV3QBMmf822clLdYEmZXB2lQ8yE/jRYMXVOYAY/e6M3pu7ynj9D8I XdYjTc3CTHC7mtCa+Fc1wpsvcFXK7MGz/2xk4axa4RL1UySzc5ieDV9TsN3bSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q5Tq9067wz1Gwv; Tue, 25 Apr 2023 17:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33PHgiIh061367; Tue, 25 Apr 2023 17:42:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33PHgi6G061366; Tue, 25 Apr 2023 17:42:44 GMT (envelope-from git) Date: Tue, 25 Apr 2023 17:42:44 GMT Message-Id: <202304251742.33PHgi6G061366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 47cf1b37f42d - main - vmm: Expose some more AVX512 CPUID bits to guests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47cf1b37f42d2acb24fa3a1e6106374dddb3edbf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=47cf1b37f42d2acb24fa3a1e6106374dddb3edbf commit 47cf1b37f42d2acb24fa3a1e6106374dddb3edbf Author: Mark Johnston AuthorDate: 2023-04-25 17:33:08 +0000 Commit: Mark Johnston CommitDate: 2023-04-25 17:35:14 +0000 vmm: Expose some more AVX512 CPUID bits to guests This is required to announce support for some accelerated AES operations. AVX512BW indicates support for the AVX512-FP16 extension and AVX512VL indicates support for the use of AVX512 instructions with vector lengths smaller than 512 bits. VAES and VPCLMULQDQ extensions indicate that VEX-prefixed AES-NI and pclmulqdq instructions are supported. All of these bits are needed for OpenSSL to use VAES to accelerate AES-GCM transforms. Reviewed by: corvink, kib, jhb MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D39781 --- sys/amd64/vmm/x86.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 2d1b2385d1e8..a054b99c6481 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -431,18 +431,22 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, /* * Expose known-safe features. */ - regs[1] &= (CPUID_STDEXT_FSGSBASE | + regs[1] &= CPUID_STDEXT_FSGSBASE | CPUID_STDEXT_BMI1 | CPUID_STDEXT_HLE | CPUID_STDEXT_AVX2 | CPUID_STDEXT_SMEP | CPUID_STDEXT_BMI2 | CPUID_STDEXT_ERMS | CPUID_STDEXT_RTM | CPUID_STDEXT_AVX512F | + CPUID_STDEXT_AVX512DQ | CPUID_STDEXT_RDSEED | CPUID_STDEXT_SMAP | CPUID_STDEXT_AVX512PF | CPUID_STDEXT_AVX512ER | - CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA); - regs[2] = 0; + CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA | + CPUID_STDEXT_AVX512BW | + CPUID_STDEXT_AVX512VL; + regs[2] &= CPUID_STDEXT2_VAES | + CPUID_STDEXT2_VPCLMULQDQ; regs[3] &= CPUID_STDEXT3_MD_CLEAR; /* Advertise RDPID if it is enabled. */