From nobody Tue May 9 14:03:01 2023 X-Original-To: dev-commits-src-branches@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 4QG0HB0yFlz4BDwf; Tue, 9 May 2023 14:03:02 +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 4QG0H95FMMz3Nbj; Tue, 9 May 2023 14:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683640981; 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=aN1gdYgeam4lgXuCOAXMgc2LZuCpJXQOqBPKgBk0Lk0=; b=xMClVyqusAYYCn7LOnCH43XaIwQF/S7FdWv9UDSgssIDHNNPIQtAcNptCTD2Vc4jJtlqYK P4YflK8JU/hV4gPnSx1ecK5v0ixJgKQrnfJiBFWxqHBfkypVtWMDTgrbAOqjd35kOGBFs+ yiMcaR63RJoJJ/qZ6+80trLtI2EJwY6eAEnhRg2BsSJZX5y4QiRlQaxDt5wKkucMhznQlb lPPLCpVQCiB03z4bMgvjYNr8Vuy8Rb04VHaeSIU9zgsR7GDGFfemKMQ5/+VxWilYEwPCXJ z/KmYqm6lSBC3z46EaK2aeJkRIAA3Hp7Ld70ghB4BPIgDCBSsybHfVId8lULtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683640981; 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=aN1gdYgeam4lgXuCOAXMgc2LZuCpJXQOqBPKgBk0Lk0=; b=V6ZXRTFz33+kg4FJbg1KoXJ6gWnZaIhbxE+WVN7kvMJcqLVTzboVfXc9wzYqK5QEfeERBn k0BQUrwbRSziOKeZbzZ7Chq08/wI0Vf/yEFm6SpIy4+/nwEUtrzoiyaFSL4q53Of5arLSg XnRG0yN0CxlpH2IqBG+HHWHW0vvMk13DqMSNLTcptkHHxAfMyMOpiLmYZCcCdUS5hb5Ngo 7tDAPGf1bbYIcg6S6skLb3EikmpLZ11fhPLB9Tm2qXjKTOZIxdmfCekKZ/YtTkIzu9/umi 9CvRFHz1a8GBCy7gUQ1Wk0ZV1nrKk+zx+iGeSCYBL7tG9Cj39gl4qm7zINaqRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683640981; a=rsa-sha256; cv=none; b=qH/vKIKkYmr4TpeKGugu+JXuKem3Eq/MYrjZdZCQIg1Rwy3A/lSO6dvlpxLElPg0u/NJdQ mKiHLEP1CvU2krJWFM1TAyWQt8+29GASP5MGQhWMCCHc+D4TuUeuPaKvZJFn8RsGejHdjx 5+v8u0tYcOnURJD66p2FaMyQ2owX3fjl9uJ65e4xdeSFCZEZyV+SWE7/ttvpihxrgoYFD/ 62pv9FHv7GUzNlOd18DtQeZRuVgNl0O5v5dtIMsz46tM/JwdJIFbYBOxsC0GjvGr47yEXx 66xLsHN0b+tJku8zBedlo7vmdrjH522OLg9SQAKtX/n34m8OUED5sJ7yOS8kOQ== 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 4QG0H944HLzWXl; Tue, 9 May 2023 14:03:01 +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 349E31fE082894; Tue, 9 May 2023 14:03:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 349E31px082893; Tue, 9 May 2023 14:03:01 GMT (envelope-from git) Date: Tue, 9 May 2023 14:03:01 GMT Message-Id: <202305091403.349E31px082893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7e06b2f3ecd7 - stable/13 - vmm: Expose some more AVX512 CPUID bits to guests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7e06b2f3ecd7001014115f66f53406b9cfee6e19 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7e06b2f3ecd7001014115f66f53406b9cfee6e19 commit 7e06b2f3ecd7001014115f66f53406b9cfee6e19 Author: Mark Johnston AuthorDate: 2023-04-25 17:33:08 +0000 Commit: Mark Johnston CommitDate: 2023-05-09 14:01:05 +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 (cherry picked from commit 47cf1b37f42d2acb24fa3a1e6106374dddb3edbf) --- 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 d99fb391afba..265d9f6951a0 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -441,18 +441,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. */