Creating X86CPU objects using object-add will allow management code to
probe for details on each CPU model when using "-machine none", and
without having to restart QEMU.
Note that object-add will _not_ create a running VCPU. It is not CPU
hotplug, which will use device_add instead of object-add. It will just
allow some information about the CPU object to be queried from the CPU
object, without starting an actual VCPU thread.
Signed-off-by: Eduardo Habkost <ehabkost(a)redhat.com>
---
target-i386/cpu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 8fd1497..2417fc8 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -43,6 +43,7 @@
#include "sysemu/sysemu.h"
#include "hw/qdev-properties.h"
#include "hw/cpu/icc_bus.h"
+#include "qom/object_interfaces.h"
#ifndef CONFIG_USER_ONLY
#include "hw/xen/xen.h"
#include "hw/i386/apic_internal.h"
@@ -2832,6 +2833,10 @@ static const TypeInfo x86_cpu_type_info = {
.abstract = true,
.class_size = sizeof(X86CPUClass),
.class_init = x86_cpu_common_class_init,
+ .interfaces = (InterfaceInfo[]) {
+ { TYPE_USER_CREATABLE },
+ { }
+ },
};
static void x86_cpu_register_types(void)
--
1.9.0