From nobody Tue Sep 22 15:41:45 2026 X-Original-To: dev-commits-src-all@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 4hq48T3MpMz6sNd3 for ; Tue, 22 Sep 2026 15:41: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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hq48T1yLzz4vPf for ; Tue, 22 Sep 2026 15:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790091705; 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=jYp7oAmNaoEet3OkxBLJVpD31y72OBwcQC8L8OCzYEo=; b=fLBQcUBLzyqpl1sLE/PpO/+/Osg3H8K82HIYIRk3ObgR6qyHHeryq7I50UFGAotmKMfeGJ V7KQ6znWMQa46B4zuqep0F1T8CNAlroZZQYqlbHzTB/nKwlUwz49Jg7IjPnhxSkUve/3Lj UFGjGEuPdjJslNzO5Ht8P8n2Mqh5OhZxQDKiY376CWaux4GYQNZNy3lT5UEEdN0SAHbEDq JEZ5wBlkUm4Bi06Zlardu5Sp/fbihNLdyZRAjKgazjPF8fOxjSQxUv/C7xRAueClVYHRqD k6Y3EGtEW7NcYXOYymyDZQy5rx+L6D0Z+K4wY96PZHpW+qKbDAkX70FCSqjaCQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790091705; b=BSE5w8yP6R6DMs8iIHGtyhvw1NhEssssZtpMoTtLaAMJcHMt3qu877nMRdyvt+/GZ7IqY6 DwzMUJbbU1D8IG9GCrk2BX32fte3+dEVTMYKIi1fYlJ0dk+qGDH7u5NbDPvoAVkvh2YarN 1SHskn/ZnedoSmnR8hYkNHFPabLV1bTdIafV04tGgBvnd2HUrToi9E7wXrW/L/8r71iw28 d+80Zc1CmjgwGb9VP7QbpGXIW3CN5v77bMW2imndzNY/4ZB02PI22S7frme06PRJLttZPa Xba1p11mLYYv5VkJKO9M/+bYTT8Vt5USW3VVpYHLjXf92RiDL2rbreMkEVAyKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790091705; 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=jYp7oAmNaoEet3OkxBLJVpD31y72OBwcQC8L8OCzYEo=; b=ObfeAAmoV44mR9t7TgIhOYYY1Thw+nS4l6KKpfmo0jk3krGhJMBbUcaG0WBRAczTWLIa5K mlGbUJPJYoQ7TbKH3qWDy8sn+IcIHy4HB7ct6Ii6DXewRwD2k/rse5bVAsvPdCRP5MgMIw gxfGNLORfO9tvYNB9E8Ane6KYL6vU0etMFY4b2wqOKJUXYrbA3QX8cRMTrd/HGuWHizu4M JrjSdpONoFMIQg+sTeITu3RDbPbPVVBzHZW6KQ5yzOqXvEiuuRqxKamq5SF0oQkloFLcBv wcSIaoHghLromfgKteXyywXkiwOf4jNu97DmcM4hYQ/rgFTqEgAFXA+EIFNwzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hq48T0kNXz1CXJ for ; Tue, 22 Sep 2026 15:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 363c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 22 Sep 2026 15:41:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 71f08bfa02a9 - main - x86: add cpu_stdext_feature5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71f08bfa02a93d5d165ce96abc9077f36e4963b6 Auto-Submitted: auto-generated Date: Tue, 22 Sep 2026 15:41:45 +0000 Message-Id: <6ab2a1b9.363c4.76d4ba0c@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=71f08bfa02a93d5d165ce96abc9077f36e4963b6 commit 71f08bfa02a93d5d165ce96abc9077f36e4963b6 Author: Konstantin Belousov AuthorDate: 2026-09-19 08:02:56 +0000 Commit: Konstantin Belousov CommitDate: 2026-09-22 15:40:40 +0000 x86: add cpu_stdext_feature5 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D59815 --- sys/x86/include/specialreg.h | 5 +++++ sys/x86/include/x86_var.h | 1 + sys/x86/x86/identcpu.c | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 7906946862c4..32d672522965 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -559,6 +559,11 @@ #define CPUID_STDEXT4_NMISRC 0x00100000 #define CPUID_STDEXT4_LAM 0x04000000 +/* + * CPUID instruction 7 Structured Extended Features, leaf 1 ecx info + */ +#define CPUID_STDEXT5_MSR_IMM 0x00000020 + /* CPUID_HYBRID_ID leaf 0x1a */ #define CPUID_HYBRID_CORE_MASK 0xff000000 #define CPUID_HYBRID_SMALL_CORE 0x20000000 diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index 1711b13b6af6..ca0ac1e97768 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -51,6 +51,7 @@ extern u_int cpu_stdext_feature; extern u_int cpu_stdext_feature2; extern u_int cpu_stdext_feature3; extern u_int cpu_stdext_feature4; +extern u_int cpu_stdext_feature5; extern uint64_t cpu_ia32_arch_caps; extern u_int cpu_high; extern u_int cpu_id; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 3060b444cb0d..331423f3b198 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -118,6 +118,7 @@ u_int cpu_stdext_feature2; /* %ecx */ u_int cpu_stdext_feature3; /* %edx */ /* leaf 7 %ecx = 1 */ u_int cpu_stdext_feature4; /* %eax */ +u_int cpu_stdext_feature5; /* %ecx */ uint64_t cpu_ia32_arch_caps; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ @@ -1064,6 +1065,14 @@ printcpuinfo(void) ); } + if (cpu_stdext_feature5 != 0) { + printf("\n Structured Extended Features5=0x%b", + cpu_stdext_feature5, + "\020" + "\006MSR_IMM" + ); + } + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { cpuid_count(0xd, 0x1, regs); if (regs[0] != 0) { @@ -1616,6 +1625,7 @@ identify_cpu2(void) if (max_eax_l7 >= 1) { cpuid_count(7, 1, regs); cpu_stdext_feature4 = regs[0]; + cpu_stdext_feature5 = regs[2]; } } }