sysemu.h (1ce6be24df0a2f634b61b9b882ac6d10af485ad6) sysemu.h (e35704ba9ce0cd1e3c401f3bfbf3faf98b0b6885)
1#ifndef SYSEMU_H
2#define SYSEMU_H
3/* Misc. things related to the system emulator. */
4
5#include "qemu/typedefs.h"
6#include "qemu/option.h"
7#include "qemu/queue.h"
8#include "qemu/timer.h"

--- 60 unchanged lines hidden (view full) ---

69void qemu_devices_reset(void);
70void qemu_system_reset(bool report);
71
72void qemu_add_exit_notifier(Notifier *notify);
73void qemu_remove_exit_notifier(Notifier *notify);
74
75void qemu_add_machine_init_done_notifier(Notifier *notify);
76
1#ifndef SYSEMU_H
2#define SYSEMU_H
3/* Misc. things related to the system emulator. */
4
5#include "qemu/typedefs.h"
6#include "qemu/option.h"
7#include "qemu/queue.h"
8#include "qemu/timer.h"

--- 60 unchanged lines hidden (view full) ---

69void qemu_devices_reset(void);
70void qemu_system_reset(bool report);
71
72void qemu_add_exit_notifier(Notifier *notify);
73void qemu_remove_exit_notifier(Notifier *notify);
74
75void qemu_add_machine_init_done_notifier(Notifier *notify);
76
77void hmp_savevm(Monitor *mon, const QDict *qdict);
77void do_savevm(Monitor *mon, const QDict *qdict);
78int load_vmstate(const char *name);
78int load_vmstate(const char *name);
79void hmp_delvm(Monitor *mon, const QDict *qdict);
80void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
79void do_delvm(Monitor *mon, const QDict *qdict);
80void do_info_snapshots(Monitor *mon, const QDict *qdict);
81
82void qemu_announce_self(void);
83
84bool qemu_savevm_state_blocked(Error **errp);
85void qemu_savevm_state_begin(QEMUFile *f,
86 const MigrationParams *params);
87int qemu_savevm_state_iterate(QEMUFile *f);
88void qemu_savevm_state_complete(QEMUFile *f);
89void qemu_savevm_state_cancel(void);
90uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size);
91int qemu_loadvm_state(QEMUFile *f);
92
81
82void qemu_announce_self(void);
83
84bool qemu_savevm_state_blocked(Error **errp);
85void qemu_savevm_state_begin(QEMUFile *f,
86 const MigrationParams *params);
87int qemu_savevm_state_iterate(QEMUFile *f);
88void qemu_savevm_state_complete(QEMUFile *f);
89void qemu_savevm_state_cancel(void);
90uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size);
91int qemu_loadvm_state(QEMUFile *f);
92
93/* SLIRP */
94void do_info_slirp(Monitor *mon);
95
93typedef enum DisplayType
94{
95 DT_DEFAULT,
96 DT_CURSES,
97 DT_SDL,
98 DT_GTK,
99 DT_NOGRAPHIC,
100 DT_NONE,

--- 38 unchanged lines hidden (view full) ---

139
140/* The following shall be true for all CPUs:
141 * cpu->cpu_index < max_cpus <= MAX_CPUMASK_BITS
142 *
143 * Note that cpu->get_arch_id() may be larger than MAX_CPUMASK_BITS.
144 */
145#define MAX_CPUMASK_BITS 255
146
96typedef enum DisplayType
97{
98 DT_DEFAULT,
99 DT_CURSES,
100 DT_SDL,
101 DT_GTK,
102 DT_NOGRAPHIC,
103 DT_NONE,

--- 38 unchanged lines hidden (view full) ---

142
143/* The following shall be true for all CPUs:
144 * cpu->cpu_index < max_cpus <= MAX_CPUMASK_BITS
145 *
146 * Note that cpu->get_arch_id() may be larger than MAX_CPUMASK_BITS.
147 */
148#define MAX_CPUMASK_BITS 255
149
147extern int nb_numa_nodes; /* Number of NUMA nodes */
148extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
149 * For all nodes, nodeid < max_numa_nodeid
150 */
151
152typedef struct node_info {
153 uint64_t node_mem;
154 DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
155 struct HostMemoryBackend *node_memdev;
156 bool present;
157} NodeInfo;
158extern NodeInfo numa_info[MAX_NODES];
159void set_numa_nodes(void);
160void set_numa_modes(void);
161void query_numa_node_mem(uint64_t node_mem[]);
162extern QemuOptsList qemu_numa_opts;
163int numa_init_func(QemuOpts *opts, void *opaque);
164
165#define MAX_OPTION_ROMS 16
166typedef struct QEMUOptionRom {
167 const char *name;
168 int32_t bootindex;
169} QEMUOptionRom;
170extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
171extern int nb_option_roms;
172
173#define MAX_PROM_ENVS 128
174extern const char *prom_envs[MAX_PROM_ENVS];
175extern unsigned int nb_prom_envs;
176
177/* pci-hotplug */
150#define MAX_OPTION_ROMS 16
151typedef struct QEMUOptionRom {
152 const char *name;
153 int32_t bootindex;
154} QEMUOptionRom;
155extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
156extern int nb_option_roms;
157
158#define MAX_PROM_ENVS 128
159extern const char *prom_envs[MAX_PROM_ENVS];
160extern unsigned int nb_prom_envs;
161
162/* pci-hotplug */
178void hmp_pci_add(Monitor *mon, const QDict *qdict);
163void pci_device_hot_add(Monitor *mon, const QDict *qdict);
179int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo);
164int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo);
180void hmp_pci_del(Monitor *mon, const QDict *qdict);
165void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict);
181
182/* generic hotplug */
166
167/* generic hotplug */
183void hmp_drive_add(Monitor *mon, const QDict *qdict);
168void drive_hot_add(Monitor *mon, const QDict *qdict);
184
185/* pcie aer error injection */
186void pcie_aer_inject_error_print(Monitor *mon, const QObject *data);
169
170/* pcie aer error injection */
171void pcie_aer_inject_error_print(Monitor *mon, const QObject *data);
187int hmp_pcie_aer_inject_error(Monitor *mon,
172int do_pcie_aer_inject_error(Monitor *mon,
188 const QDict *qdict, QObject **ret_data);
189
190/* serial ports */
191
192#define MAX_SERIAL_PORTS 4
193
194extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
195
196/* parallel ports */
197
198#define MAX_PARALLEL_PORTS 3
199
200extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
201
173 const QDict *qdict, QObject **ret_data);
174
175/* serial ports */
176
177#define MAX_SERIAL_PORTS 4
178
179extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
180
181/* parallel ports */
182
183#define MAX_PARALLEL_PORTS 3
184
185extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
186
202void hmp_usb_add(Monitor *mon, const QDict *qdict);
203void hmp_usb_del(Monitor *mon, const QDict *qdict);
204void hmp_info_usb(Monitor *mon, const QDict *qdict);
187void do_usb_add(Monitor *mon, const QDict *qdict);
188void do_usb_del(Monitor *mon, const QDict *qdict);
189void usb_info(Monitor *mon, const QDict *qdict);
205
206void add_boot_device_path(int32_t bootindex, DeviceState *dev,
207 const char *suffix);
208char *get_boot_devices_list(size_t *size, bool ignore_suffixes);
209
210DeviceState *get_boot_device(uint32_t position);
211void check_boot_index(int32_t bootindex, Error **errp);
212void del_boot_device_path(DeviceState *dev, const char *suffix);

--- 28 unchanged lines hidden ---
190
191void add_boot_device_path(int32_t bootindex, DeviceState *dev,
192 const char *suffix);
193char *get_boot_devices_list(size_t *size, bool ignore_suffixes);
194
195DeviceState *get_boot_device(uint32_t position);
196void check_boot_index(int32_t bootindex, Error **errp);
197void del_boot_device_path(DeviceState *dev, const char *suffix);

--- 28 unchanged lines hidden ---