aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/cpu/core.c10
-rw-r--r--target/i386/cpu.c12
2 files changed, 20 insertions, 2 deletions
diff --git a/hw/cpu/core.c b/hw/cpu/core.c
index 92d3b2f..9876075 100644
--- a/hw/cpu/core.c
+++ b/hw/cpu/core.c
@@ -66,10 +66,16 @@ static void core_prop_set_nr_threads(Object *obj, Visitor *v, const char *name,
static void cpu_core_instance_init(Object *obj)
{
- MachineState *ms = MACHINE(qdev_get_machine());
CPUCore *core = CPU_CORE(obj);
- core->nr_threads = ms->smp.threads;
+ /*
+ * Only '-device something-cpu-core,help' can get us there before
+ * the machine has been created. We don't care to set nr_threads
+ * in this case since it isn't used afterwards.
+ */
+ if (current_machine) {
+ core->nr_threads = current_machine->smp.threads;
+ }
}
static void cpu_core_class_init(ObjectClass *oc, void *data)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 6b3e946..ad99cad 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4179,6 +4179,18 @@ static X86CPUDefinition builtin_x86_defs[] = {
.xlevel = 0x8000001E,
.model_id = "AMD EPYC-Rome Processor",
.cache_info = &epyc_rome_cache_info,
+ .versions = (X86CPUVersionDefinition[]) {
+ { .version = 1 },
+ {
+ .version = 2,
+ .props = (PropValue[]) {
+ { "ibrs", "on" },
+ { "amd-ssbd", "on" },
+ { /* end of list */ }
+ }
+ },
+ { /* end of list */ }
+ }
},
{
.name = "EPYC-Milan",