From: jsg Date: Wed, 16 Aug 2023 04:07:37 +0000 (+0000) Subject: add Intel ARCH_CAP_GDS bits X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a542e1e62bb220a9cda522b61d06d7a514bee727;p=openbsd add Intel ARCH_CAP_GDS bits mentioned in https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/gather-data-sampling.html --- diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index 557e40586a0..ecbdc0afe4e 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identcpu.c,v 1.136 2023/08/09 00:01:44 jsg Exp $ */ +/* $OpenBSD: identcpu.c,v 1.137 2023/08/16 04:07:37 jsg Exp $ */ /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /* @@ -271,6 +271,8 @@ const struct { { ARCH_CAP_XAPIC_DISABLE_STATUS, "XAPIC_DIS" }, { ARCH_CAP_OVERCLOCKING_STATUS, "OVERCLOCK" }, { ARCH_CAP_PBRSB_NO, "PBRSB_NO" }, + { ARCH_CAP_GDS_CTRL, "GDS_CTRL" }, + { ARCH_CAP_GDS_NO, "GDS_NO" }, }; int diff --git a/sys/arch/amd64/include/specialreg.h b/sys/arch/amd64/include/specialreg.h index 86ca64ea121..2d7c0307ed9 100644 --- a/sys/arch/amd64/include/specialreg.h +++ b/sys/arch/amd64/include/specialreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: specialreg.h,v 1.107 2023/07/27 16:33:56 guenther Exp $ */ +/* $OpenBSD: specialreg.h,v 1.108 2023/08/16 04:07:37 jsg Exp $ */ /* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */ /* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */ @@ -425,6 +425,8 @@ #define ARCH_CAP_XAPIC_DISABLE_STATUS (1 << 21) /* can disable xAPIC */ #define ARCH_CAP_OVERCLOCKING_STATUS (1 << 23) /* has OVRCLCKNG_STAT MSR */ #define ARCH_CAP_PBRSB_NO (1 << 24) /* PBSR safe */ +#define ARCH_CAP_GDS_CTRL (1 << 25) /* has GDS_MITG_DIS/LOCK */ +#define ARCH_CAP_GDS_NO (1 << 26) /* GDS safe */ #define MSR_FLUSH_CMD 0x10b #define FLUSH_CMD_L1D_FLUSH 0x1 /* (1ULL << 0) */ #define MSR_BBL_CR_ADDR 0x116 /* PII+ only */ diff --git a/sys/arch/i386/include/specialreg.h b/sys/arch/i386/include/specialreg.h index 0a1dbe4f559..9bcee47cdda 100644 --- a/sys/arch/i386/include/specialreg.h +++ b/sys/arch/i386/include/specialreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: specialreg.h,v 1.84 2023/07/28 03:06:46 jsg Exp $ */ +/* $OpenBSD: specialreg.h,v 1.85 2023/08/16 04:07:38 jsg Exp $ */ /* $NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $ */ /*- @@ -370,6 +370,8 @@ #define ARCH_CAP_XAPIC_DISABLE_STATUS (1 << 21) /* can disable xAPIC */ #define ARCH_CAP_OVERCLOCKING_STATUS (1 << 23) /* has OVRCLCKNG_STAT MSR */ #define ARCH_CAP_PBRSB_NO (1 << 24) /* PBSR safe */ +#define ARCH_CAP_GDS_CTRL (1 << 25) /* has GDS_MITG_DIS/LOCK */ +#define ARCH_CAP_GDS_NO (1 << 26) /* GDS safe */ #define MSR_FLUSH_CMD 0x10b #define FLUSH_CMD_L1D_FLUSH (1ULL << 0) #define MSR_BBL_CR_ADDR 0x116 /* PII+ only */