aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/qmp.c b/qmp.c
index f556a04d19..87a28f797d 100644
--- a/qmp.c
+++ b/qmp.c
@@ -114,8 +114,11 @@ void qmp_cpu(int64_t index, Error **errp)
void qmp_cpu_add(int64_t id, Error **errp)
{
- if (current_machine->hot_add_cpu) {
- current_machine->hot_add_cpu(id, errp);
+ MachineClass *mc;
+
+ mc = MACHINE_GET_CLASS(current_machine);
+ if (mc->qemu_machine->hot_add_cpu) {
+ mc->qemu_machine->hot_add_cpu(id, errp);
} else {
error_setg(errp, "Not supported");
}