}
};
+static bool pl0_ssp_needed(void *opaque)
+{
+ X86CPU *cpu = opaque;
+
+ /*
+ * CPUID_7_1_EAX_FRED and CPUID_7_0_ECX_CET_SHSTK are checked because
+ * if all of these bits are zero and the MSR will not be settable.
+ */
+ return !!(cpu->env.pl0_ssp);
+}
+
+static const VMStateDescription vmstate_pl0_ssp = {
+ .name = "cpu/msr_pl0_ssp",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = pl0_ssp_needed,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT64(env.pl0_ssp, X86CPU),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
const VMStateDescription vmstate_x86_cpu = {
.name = "cpu",
.version_id = 12,
#endif
&vmstate_arch_lbr,
&vmstate_triple_fault,
+ &vmstate_pl0_ssp,
NULL
}
};