Patchwork [21/29] Add hot_add_cpu hook to QEMUMachine

login
register
mail settings
Submitter Andreas Färber
Date May 2, 2013, 1:35 p.m.
Message ID <1367501755-32272-22-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/240984/
State New
Headers show

Comments

Andreas Färber - May 2, 2013, 1:35 p.m.
From: Igor Mammedov <imammedo@redhat.com>

Hook should be set by machines that implement CPU hot-add
via cpu-add QMP command.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/hw/boards.h | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 425bdc7..fb7c6f1 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -22,12 +22,15 @@  typedef void QEMUMachineInitFunc(QEMUMachineInitArgs *args);
 
 typedef void QEMUMachineResetFunc(void);
 
+typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
+
 typedef struct QEMUMachine {
     const char *name;
     const char *alias;
     const char *desc;
     QEMUMachineInitFunc *init;
     QEMUMachineResetFunc *reset;
+    QEMUMachineHotAddCPUFunc *hot_add_cpu;
     BlockInterfaceType block_default_type;
     int max_cpus;
     unsigned int no_serial:1,