root / sysemu.h @ fb5590f7
History | View | Annotate | Download (5.2 kB)
1 | 87ecb68b | pbrook | #ifndef SYSEMU_H
|
---|---|---|---|
2 | 87ecb68b | pbrook | #define SYSEMU_H
|
3 | 87ecb68b | pbrook | /* Misc. things related to the system emulator. */
|
4 | 87ecb68b | pbrook | |
5 | 376253ec | aliguori | #include "qemu-common.h" |
6 | 62c5802e | Gerd Hoffmann | #include "qemu-option.h" |
7 | 72cf2d4f | Blue Swirl | #include "qemu-queue.h" |
8 | 6875204c | Jan Kiszka | #include "qemu-timer.h" |
9 | 1fa9a5e4 | Luiz Capitulino | #include "qapi-types.h" |
10 | fd42deeb | Gerd Hoffmann | #include "notify.h" |
11 | 44a9b356 | Paolo Bonzini | #include "main-loop.h" |
12 | 376253ec | aliguori | |
13 | 87ecb68b | pbrook | /* vl.c */
|
14 | 1dfb4dd9 | Luiz Capitulino | |
15 | 87ecb68b | pbrook | extern const char *bios_name; |
16 | 5cea8590 | Paul Brook | |
17 | 87ecb68b | pbrook | extern const char *qemu_name; |
18 | 8fcb1b90 | blueswir1 | extern uint8_t qemu_uuid[];
|
19 | c4be29ff | aliguori | int qemu_uuid_parse(const char *str, uint8_t *uuid); |
20 | 8fcb1b90 | blueswir1 | #define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" |
21 | 87ecb68b | pbrook | |
22 | 5db9d4d1 | Luiz Capitulino | void runstate_init(void); |
23 | f5bbfba1 | Luiz Capitulino | bool runstate_check(RunState state);
|
24 | f5bbfba1 | Luiz Capitulino | void runstate_set(RunState new_state);
|
25 | 1354869c | Luiz Capitulino | int runstate_is_running(void); |
26 | 87ecb68b | pbrook | typedef struct vm_change_state_entry VMChangeStateEntry; |
27 | 1dfb4dd9 | Luiz Capitulino | typedef void VMChangeStateHandler(void *opaque, int running, RunState state); |
28 | 87ecb68b | pbrook | |
29 | 87ecb68b | pbrook | VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb, |
30 | 87ecb68b | pbrook | void *opaque);
|
31 | 87ecb68b | pbrook | void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
|
32 | 1dfb4dd9 | Luiz Capitulino | void vm_state_notify(int running, RunState state); |
33 | e07bbac5 | Jan Kiszka | |
34 | e063eb1f | Jan Kiszka | #define VMRESET_SILENT false |
35 | e063eb1f | Jan Kiszka | #define VMRESET_REPORT true |
36 | e063eb1f | Jan Kiszka | |
37 | 87ecb68b | pbrook | void vm_start(void); |
38 | 1dfb4dd9 | Luiz Capitulino | void vm_stop(RunState state);
|
39 | 8a9236f1 | Luiz Capitulino | void vm_stop_force_state(RunState state);
|
40 | 87ecb68b | pbrook | |
41 | 87ecb68b | pbrook | void qemu_system_reset_request(void); |
42 | 87ecb68b | pbrook | void qemu_system_shutdown_request(void); |
43 | 87ecb68b | pbrook | void qemu_system_powerdown_request(void); |
44 | 8cf71710 | Jan Kiszka | void qemu_system_debug_request(void); |
45 | 1dfb4dd9 | Luiz Capitulino | void qemu_system_vmstop_request(RunState reason);
|
46 | 1291eb35 | Anthony PERARD | int qemu_shutdown_requested_get(void); |
47 | 1291eb35 | Anthony PERARD | int qemu_reset_requested_get(void); |
48 | cf7a2fe2 | aurel32 | int qemu_shutdown_requested(void); |
49 | cf7a2fe2 | aurel32 | int qemu_reset_requested(void); |
50 | cf7a2fe2 | aurel32 | int qemu_powerdown_requested(void); |
51 | f64622c4 | Gleb Natapov | void qemu_system_killed(int signal, pid_t pid); |
52 | f64622c4 | Gleb Natapov | void qemu_kill_report(void); |
53 | d9c32310 | Blue Swirl | extern qemu_irq qemu_system_powerdown;
|
54 | e063eb1f | Jan Kiszka | void qemu_system_reset(bool report); |
55 | 87ecb68b | pbrook | |
56 | fd42deeb | Gerd Hoffmann | void qemu_add_exit_notifier(Notifier *notify);
|
57 | fd42deeb | Gerd Hoffmann | void qemu_remove_exit_notifier(Notifier *notify);
|
58 | fd42deeb | Gerd Hoffmann | |
59 | 4cab946a | Gleb Natapov | void qemu_add_machine_init_done_notifier(Notifier *notify);
|
60 | 4cab946a | Gleb Natapov | |
61 | d54908a5 | Luiz Capitulino | void do_savevm(Monitor *mon, const QDict *qdict); |
62 | 03cd4655 | Markus Armbruster | int load_vmstate(const char *name); |
63 | d54908a5 | Luiz Capitulino | void do_delvm(Monitor *mon, const QDict *qdict); |
64 | 376253ec | aliguori | void do_info_snapshots(Monitor *mon);
|
65 | 87ecb68b | pbrook | |
66 | 210f41ba | aliguori | void qemu_announce_self(void); |
67 | 210f41ba | aliguori | |
68 | dc912121 | Alex Williamson | bool qemu_savevm_state_blocked(Monitor *mon);
|
69 | f327aa0c | Jan Kiszka | int qemu_savevm_state_begin(Monitor *mon, QEMUFile *f, int blk_enable, |
70 | f327aa0c | Jan Kiszka | int shared);
|
71 | f327aa0c | Jan Kiszka | int qemu_savevm_state_iterate(Monitor *mon, QEMUFile *f);
|
72 | f327aa0c | Jan Kiszka | int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f);
|
73 | f327aa0c | Jan Kiszka | void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f);
|
74 | 9366f418 | aliguori | int qemu_loadvm_state(QEMUFile *f);
|
75 | 9366f418 | aliguori | |
76 | 87ecb68b | pbrook | /* SLIRP */
|
77 | 376253ec | aliguori | void do_info_slirp(Monitor *mon);
|
78 | 87ecb68b | pbrook | |
79 | 993fbfdb | Anthony Liguori | typedef enum DisplayType |
80 | 993fbfdb | Anthony Liguori | { |
81 | 993fbfdb | Anthony Liguori | DT_DEFAULT, |
82 | 993fbfdb | Anthony Liguori | DT_CURSES, |
83 | 993fbfdb | Anthony Liguori | DT_SDL, |
84 | 993fbfdb | Anthony Liguori | DT_NOGRAPHIC, |
85 | 4171d32e | Jes Sorensen | DT_NONE, |
86 | 993fbfdb | Anthony Liguori | } DisplayType; |
87 | 993fbfdb | Anthony Liguori | |
88 | d399f677 | Paolo Bonzini | extern int autostart; |
89 | 87ecb68b | pbrook | extern int bios_size; |
90 | 86176759 | Zachary Amsden | |
91 | 86176759 | Zachary Amsden | typedef enum { |
92 | a19cbfb3 | Gerd Hoffmann | VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL, |
93 | 86176759 | Zachary Amsden | } VGAInterfaceType; |
94 | 86176759 | Zachary Amsden | |
95 | 86176759 | Zachary Amsden | extern int vga_interface_type; |
96 | 86176759 | Zachary Amsden | #define cirrus_vga_enabled (vga_interface_type == VGA_CIRRUS)
|
97 | 86176759 | Zachary Amsden | #define std_vga_enabled (vga_interface_type == VGA_STD)
|
98 | 86176759 | Zachary Amsden | #define xenfb_enabled (vga_interface_type == VGA_XENFB)
|
99 | 86176759 | Zachary Amsden | #define vmsvga_enabled (vga_interface_type == VGA_VMWARE)
|
100 | a19cbfb3 | Gerd Hoffmann | #define qxl_enabled (vga_interface_type == VGA_QXL)
|
101 | 86176759 | Zachary Amsden | |
102 | 87ecb68b | pbrook | extern int graphic_width; |
103 | 87ecb68b | pbrook | extern int graphic_height; |
104 | 87ecb68b | pbrook | extern int graphic_depth; |
105 | 993fbfdb | Anthony Liguori | extern DisplayType display_type;
|
106 | 87ecb68b | pbrook | extern const char *keyboard_layout; |
107 | 87ecb68b | pbrook | extern int win2k_install_hack; |
108 | 87ecb68b | pbrook | extern int alt_grab; |
109 | 0ca9f8a4 | Dustin Kirkland | extern int ctrl_grab; |
110 | 87ecb68b | pbrook | extern int usb_enabled; |
111 | 87ecb68b | pbrook | extern int smp_cpus; |
112 | 6be68d7e | Jes Sorensen | extern int max_cpus; |
113 | 87ecb68b | pbrook | extern int cursor_hide; |
114 | 87ecb68b | pbrook | extern int graphic_rotate; |
115 | 87ecb68b | pbrook | extern int no_quit; |
116 | a691d41a | Luiz Capitulino | extern int no_shutdown; |
117 | 87ecb68b | pbrook | extern int semihosting_enabled; |
118 | 87ecb68b | pbrook | extern int old_param; |
119 | 95387491 | Jan Kiszka | extern int boot_menu; |
120 | 3d3b8303 | wayne | extern uint8_t *boot_splash_filedata;
|
121 | 3d3b8303 | wayne | extern int boot_splash_filedata_size; |
122 | 3d3b8303 | wayne | extern uint8_t qemu_extra_params_fw[2]; |
123 | 6875204c | Jan Kiszka | extern QEMUClock *rtc_clock;
|
124 | 87ecb68b | pbrook | |
125 | 268a362c | aliguori | #define MAX_NODES 64 |
126 | 268a362c | aliguori | extern int nb_numa_nodes; |
127 | 268a362c | aliguori | extern uint64_t node_mem[MAX_NODES];
|
128 | 075cd324 | Blue Swirl | extern uint64_t node_cpumask[MAX_NODES];
|
129 | 268a362c | aliguori | |
130 | 87ecb68b | pbrook | #define MAX_OPTION_ROMS 16 |
131 | 2e55e842 | Gleb Natapov | typedef struct QEMUOptionRom { |
132 | 2e55e842 | Gleb Natapov | const char *name; |
133 | 2e55e842 | Gleb Natapov | int32_t bootindex; |
134 | 2e55e842 | Gleb Natapov | } QEMUOptionRom; |
135 | 2e55e842 | Gleb Natapov | extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
|
136 | 87ecb68b | pbrook | extern int nb_option_roms; |
137 | 87ecb68b | pbrook | |
138 | 87ecb68b | pbrook | #define MAX_PROM_ENVS 128 |
139 | 87ecb68b | pbrook | extern const char *prom_envs[MAX_PROM_ENVS]; |
140 | 87ecb68b | pbrook | extern unsigned int nb_prom_envs; |
141 | 87ecb68b | pbrook | |
142 | 6f338c34 | aliguori | /* pci-hotplug */
|
143 | 6c6a58ae | Markus Armbruster | void pci_device_hot_add(Monitor *mon, const QDict *qdict); |
144 | dd97aa8a | Alexander Graf | int pci_drive_hot_add(Monitor *mon, const QDict *qdict, |
145 | dd97aa8a | Alexander Graf | DriveInfo *dinfo, int type);
|
146 | b752daf0 | Markus Armbruster | void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); |
147 | 6f338c34 | aliguori | |
148 | dd97aa8a | Alexander Graf | /* generic hotplug */
|
149 | dd97aa8a | Alexander Graf | void drive_hot_add(Monitor *mon, const QDict *qdict); |
150 | dd97aa8a | Alexander Graf | |
151 | 2ae63bda | Isaku Yamahata | /* pcie aer error injection */
|
152 | 2ae63bda | Isaku Yamahata | void pcie_aer_inject_error_print(Monitor *mon, const QObject *data); |
153 | 1f3392b7 | Zhi Yong Wu | int do_pcie_aer_inject_error(Monitor *mon,
|
154 | 2ae63bda | Isaku Yamahata | const QDict *qdict, QObject **ret_data);
|
155 | 2ae63bda | Isaku Yamahata | |
156 | 87ecb68b | pbrook | /* serial ports */
|
157 | 87ecb68b | pbrook | |
158 | 87ecb68b | pbrook | #define MAX_SERIAL_PORTS 4 |
159 | 87ecb68b | pbrook | |
160 | 87ecb68b | pbrook | extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
|
161 | 87ecb68b | pbrook | |
162 | 87ecb68b | pbrook | /* parallel ports */
|
163 | 87ecb68b | pbrook | |
164 | 87ecb68b | pbrook | #define MAX_PARALLEL_PORTS 3 |
165 | 87ecb68b | pbrook | |
166 | 87ecb68b | pbrook | extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
|
167 | 87ecb68b | pbrook | |
168 | d54908a5 | Luiz Capitulino | void do_usb_add(Monitor *mon, const QDict *qdict); |
169 | d54908a5 | Luiz Capitulino | void do_usb_del(Monitor *mon, const QDict *qdict); |
170 | 376253ec | aliguori | void usb_info(Monitor *mon);
|
171 | 87ecb68b | pbrook | |
172 | 80cd3478 | Luiz Capitulino | void rtc_change_mon_event(struct tm *tm); |
173 | 80cd3478 | Luiz Capitulino | |
174 | aae9460e | Paul Brook | void register_devices(void); |
175 | aae9460e | Paul Brook | |
176 | 1ca4d09a | Gleb Natapov | void add_boot_device_path(int32_t bootindex, DeviceState *dev,
|
177 | 1ca4d09a | Gleb Natapov | const char *suffix); |
178 | 962630f2 | Gleb Natapov | char *get_boot_devices_list(uint32_t *size);
|
179 | 87ecb68b | pbrook | #endif |