Skip to contentSkip to conversation

target/i386: introduce ITS_NO to several models

PATCH Applied Jon Kohler 2 participants 8 messages Nov 6, 2025 – Mar 1

lore
Share & tools
lore

Jon Kohler

author
#0 lore raw

cover target/i386: introduce ITS_NO to several models

ITS_NO is a synthetic bit that indicates to a guest VM that it is running on hardware that A) is not vulnerable to ITS vulnerability and
B) will not be migrated to a host that is vulnerable to ITS.

Guests will use ITS_NO to opt out of mitigating against ITS.

Intel Sapphire Rapids and higher are all invulnerable to ITS.

Note: for posterity, add MSR_ARCH_CAP_ITS_NO bit definition, such that future CPU models can add ITS_NO without needing a sub version for its-no.

Jon Kohler (5):
target/i386: Add MSR_IA32_ARCH_CAPABILITIES ITS_NO target/i386: introduce SapphireRapids-v5 to expose ITS_NO target/i386: introduce GraniteRapids-v4 to expose ITS_NO target/i386: introduce SierraForest-v4 to expose ITS_NO target/i386: introduce ClearwaterForest-v2 to expose ITS_NO

 target/i386/cpu.c | 35 +++++++++++++++++++++++++++++++++++
 target/i386/cpu.h |  1 +
 2 files changed, 36 insertions(+)
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 2/5 target/i386: introduce SapphireRapids-v5 to expose ITS_NO

Expose ITS_NO by default, as users using Sapphire Rapids and higher CPU models would not be able to live migrate to lower CPU hosts due to missing features. In that case, they would not be vulnerable to ITS.

its-no was originally added on [1], but needs to be exposed on the individual CPU models for the guests to see by default.

[1] 74978391b2da ("target/i386: Make ITS_NO available to guests")

---
 target/i386/cpu.c | 9 +++++++++
 1 file changed, 9 insertions(+)
target/i386/cpu.c +9 -0
index 6417775786..e579b790e0 100644
@@ -5111,6 +5111,15 @@ static const X86CPUDefinition builtin_x86_defs[] = {
                     { /* end of list */ },
                 }
             },
+            {
+                .version = 5,
+                .note = "with ITS_NO",
+                .cache_info = &xeon_spr_cache_info,
+                .props = (PropValue[]) {
+                    { "its-no", "on" },
+                    { /* end of list */ },
+                }
+            },
             { /* end of list */ }
         }
     },
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 1/5 target/i386: Add MSR_IA32_ARCH_CAPABILITIES ITS_NO

In reply to Jon Kohler

Add bit definition for Indirect Target Selection (ITS_NO) bit 62, to allow ITS_NO to be added directly to a CPU model in the future.

---
 target/i386/cpu.h | 1 +
 1 file changed, 1 insertion(+)
target/i386/cpu.h +1 -0
index cee1f692a1..93f466fb2b 100644
@@ -1245,6 +1245,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);
 #define MSR_ARCH_CAP_PBRSB_NO           (1U << 24)
 #define MSR_ARCH_CAP_GDS_NO             (1U << 26)
 #define MSR_ARCH_CAP_RFDS_NO            (1U << 27)
+#define MSR_ARCH_CAP_ITS_NO             (1U << 62)
 
 #define MSR_CORE_CAP_SPLIT_LOCK_DETECT  (1U << 5)
 
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 3/5 target/i386: introduce GraniteRapids-v4 to expose ITS_NO

In reply to Jon Kohler

Expose ITS_NO by default, as users using Granite Rapids and higher CPU models would not be able to live migrate to lower CPU hosts due to missing features. In that case, they would not be vulnerable to ITS.

its-no was originally added on [1], but needs to be exposed on the individual CPU models for the guests to see by default.

[1] 74978391b2da ("target/i386: Make ITS_NO available to guests")

---
 target/i386/cpu.c | 9 +++++++++
 1 file changed, 9 insertions(+)
target/i386/cpu.c +9 -0
index e579b790e0..afbfe11733 100644
@@ -5282,6 +5282,15 @@ static const X86CPUDefinition builtin_x86_defs[] = {
                     { /* end of list */ },
                 }
             },
+            {
+                .version = 4,
+                .note = "with ITS_NO",
+                .cache_info = &xeon_gnr_cache_info,
+                .props = (PropValue[]) {
+                    { "its-no", "on" },
+                    { /* end of list */ },
+                }
+            },
             { /* end of list */ },
         },
     },
Signature · 1 line
2.43.0
author
#4 lore raw

PATCH 4/5 target/i386: introduce SierraForest-v4 to expose ITS_NO

In reply to Jon Kohler

Expose ITS_NO by default, as users using Sierra Forest and higher CPU models would not be able to live migrate to lower CPU hosts due to missing features. In that case, they would not be vulnerable to ITS.

its-no was originally added on [1], but needs to be exposed on the individual CPU models for the guests to see by default.

Note: For SRF, version 2 already exposed BHI_CTRL, which would already mark the CPU as invulnerable to ITS (at least in Linux); however, expose ITS_NO for completeness.

[1] 74978391b2da ("target/i386: Make ITS_NO available to guests")

---
 target/i386/cpu.c | 9 +++++++++
 1 file changed, 9 insertions(+)
target/i386/cpu.c +9 -0
index afbfe11733..a522805233 100644
@@ -5445,6 +5445,15 @@ static const X86CPUDefinition builtin_x86_defs[] = {
                     { /* end of list */ },
                 }
             },
+            {
+                .version = 4,
+                .note = "with ITS_NO",
+                .cache_info = &xeon_srf_cache_info,
+                .props = (PropValue[]) {
+                    { "its-no", "on" },
+                    { /* end of list */ },
+                }
+            },
             { /* end of list */ },
         },
     },
Signature · 1 line
2.43.0
author
#5 lore raw

PATCH 5/5 target/i386: introduce ClearwaterForest-v2 to expose ITS_NO

In reply to Jon Kohler

Expose ITS_NO by default, as users using Clearwater Forest and higher CPU models would not be able to live migrate to lower CPU hosts due to missing features. In that case, they would not be vulnerable to ITS.

its-no was originally added on [1], but needs to be exposed on the individual CPU models for the guests to see by default.

Note: Version 1 already exposes ARCH_CAP_BHI_NO, which would already mark the CPU as invulnerable to ITS (at least in Linux); however, expose ITS_NO for completeness.

[1] 74978391b2da ("target/i386: Make ITS_NO available to guests")

---
 target/i386/cpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)
target/i386/cpu.c +8 -0
index a522805233..9b66a19b7b 100644
@@ -5589,6 +5589,14 @@ static const X86CPUDefinition builtin_x86_defs[] = {
         .model_id = "Intel Xeon Processor (ClearwaterForest)",
         .versions = (X86CPUVersionDefinition[]) {
             { .version = 1 },
+            {
+                .version = 2,
+                .note = "with ITS_NO",
+                .props = (PropValue[]) {
+                    { "its-no", "on" },
+                    { /* end of list */ },
+                }
+            },
             { /* end of list */ },
         },
     },
Signature · 1 line
2.43.0
author
#6 lore raw
In reply to Jon Kohler
Quoted 23 lines · Jon Kohler

ITS_NO is a synthetic bit that indicates to a guest VM that it is running on hardware that A) is not vulnerable to ITS vulnerability and
B) will not be migrated to a host that is vulnerable to ITS.

Guests will use ITS_NO to opt out of mitigating against ITS.

Intel Sapphire Rapids and higher are all invulnerable to ITS.

Note: for posterity, add MSR_ARCH_CAP_ITS_NO bit definition, such that future CPU models can add ITS_NO without needing a sub version for its-no.

Jon Kohler (5):
target/i386: Add MSR_IA32_ARCH_CAPABILITIES ITS_NO target/i386: introduce SapphireRapids-v5 to expose ITS_NO target/i386: introduce GraniteRapids-v4 to expose ITS_NO target/i386: introduce SierraForest-v4 to expose ITS_NO target/i386: introduce ClearwaterForest-v2 to expose ITS_NO

Quoted 6 lines

target/i386/cpu.c | 35 +++++++++++++++++++++++++++++++++++ target/i386/cpu.h | 1 +

2 files changed, 36 insertions(+)
Signature · 1 line
2.43.0

Gentle ping on this series, any feedback?