there are more than 8 CPUs, Xen will switch to `bigsmp` over
`default`.
+### allow\_unsafe
+> `= <boolean>`
+
+Force boot on potentially unsafe systems. By default Xen will refuse to boot on
+systems with the following errata:
+
+* AMD Erratum 121. Processors with this erratum are subject to a guest
+ triggerable Denial of Service. Override only if you trust all of your PV
+ guests.
+
### apic\_verbosity
> `= verbose | debug`
static char opt_famrev[14];
string_param("cpuid_mask_cpu", opt_famrev);
+static bool_t opt_allow_unsafe;
+boolean_param("allow_unsafe", opt_allow_unsafe);
+
static inline void wrmsr_amd(unsigned int index, unsigned int lo,
unsigned int hi)
{
clear_bit(X86_FEATURE_MWAIT, c->x86_capability);
#ifdef __x86_64__
+ if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+ panic("Xen will not boot on this CPU for security reasons.\n"
+ "Pass \"allow_unsafe\" if you're trusting all your"
+ " (PV) guest kernels.\n");
+
/* AMD CPUs do not support SYSENTER outside of legacy mode. */
clear_bit(X86_FEATURE_SEP, c->x86_capability);
#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff)
#define AMD_MODEL_RANGE_END(range) ((range) & 0xfff)
+#define AMD_ERRATUM_121 \
+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
+
#define AMD_ERRATUM_170 \
AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))