root / sysemu.h @ a74cdab4
History | View | Annotate | Download (4.9 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 | fd42deeb | Gerd Hoffmann | #include "notify.h" |
10 | 376253ec | aliguori | |
11 | 87ecb68b | pbrook | /* vl.c */
|
12 | 87ecb68b | pbrook | extern const char *bios_name; |
13 | 5cea8590 | Paul Brook | |
14 | 87ecb68b | pbrook | extern int vm_running; |
15 | 87ecb68b | pbrook | extern const char *qemu_name; |
16 | 8fcb1b90 | blueswir1 | extern uint8_t qemu_uuid[];
|
17 | c4be29ff | aliguori | int qemu_uuid_parse(const char *str, uint8_t *uuid); |
18 | 8fcb1b90 | blueswir1 | #define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" |
19 | 87ecb68b | pbrook | |
20 | 87ecb68b | pbrook | typedef struct vm_change_state_entry VMChangeStateEntry; |
21 | 9781e040 | aliguori | typedef void VMChangeStateHandler(void *opaque, int running, int reason); |
22 | 87ecb68b | pbrook | |
23 | 87ecb68b | pbrook | VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb, |
24 | 87ecb68b | pbrook | void *opaque);
|
25 | 87ecb68b | pbrook | void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
|
26 | 87ecb68b | pbrook | |
27 | e07bbac5 | Jan Kiszka | #define VMSTOP_USER 0 |
28 | e07bbac5 | Jan Kiszka | #define VMSTOP_DEBUG 1 |
29 | e07bbac5 | Jan Kiszka | #define VMSTOP_SHUTDOWN 2 |
30 | e07bbac5 | Jan Kiszka | #define VMSTOP_DISKFULL 3 |
31 | e07bbac5 | Jan Kiszka | #define VMSTOP_WATCHDOG 4 |
32 | e07bbac5 | Jan Kiszka | #define VMSTOP_PANIC 5 |
33 | e07bbac5 | Jan Kiszka | #define VMSTOP_SAVEVM 6 |
34 | e07bbac5 | Jan Kiszka | #define VMSTOP_LOADVM 7 |
35 | e07bbac5 | Jan Kiszka | #define VMSTOP_MIGRATE 8 |
36 | e07bbac5 | Jan Kiszka | |
37 | 87ecb68b | pbrook | void vm_start(void); |
38 | 87ecb68b | pbrook | void vm_stop(int reason); |
39 | 87ecb68b | pbrook | |
40 | 87ecb68b | pbrook | void qemu_system_reset_request(void); |
41 | 87ecb68b | pbrook | void qemu_system_shutdown_request(void); |
42 | 87ecb68b | pbrook | void qemu_system_powerdown_request(void); |
43 | 8cf71710 | Jan Kiszka | void qemu_system_debug_request(void); |
44 | 8cf71710 | Jan Kiszka | void qemu_system_vmstop_request(int reason); |
45 | 1291eb35 | Anthony PERARD | int qemu_shutdown_requested_get(void); |
46 | 1291eb35 | Anthony PERARD | int qemu_reset_requested_get(void); |
47 | cf7a2fe2 | aurel32 | int qemu_shutdown_requested(void); |
48 | cf7a2fe2 | aurel32 | int qemu_reset_requested(void); |
49 | cf7a2fe2 | aurel32 | int qemu_powerdown_requested(void); |
50 | f64622c4 | Gleb Natapov | void qemu_system_killed(int signal, pid_t pid); |
51 | f64622c4 | Gleb Natapov | void qemu_kill_report(void); |
52 | d9c32310 | Blue Swirl | extern qemu_irq qemu_system_powerdown;
|
53 | cf7a2fe2 | aurel32 | void qemu_system_reset(void); |
54 | 87ecb68b | pbrook | |
55 | fd42deeb | Gerd Hoffmann | void qemu_add_exit_notifier(Notifier *notify);
|
56 | fd42deeb | Gerd Hoffmann | void qemu_remove_exit_notifier(Notifier *notify);
|
57 | fd42deeb | Gerd Hoffmann | |
58 | 4cab946a | Gleb Natapov | void qemu_add_machine_init_done_notifier(Notifier *notify);
|
59 | 4cab946a | Gleb Natapov | |
60 | d54908a5 | Luiz Capitulino | void do_savevm(Monitor *mon, const QDict *qdict); |
61 | 03cd4655 | Markus Armbruster | int load_vmstate(const char *name); |
62 | d54908a5 | Luiz Capitulino | void do_delvm(Monitor *mon, const QDict *qdict); |
63 | 376253ec | aliguori | void do_info_snapshots(Monitor *mon);
|
64 | 87ecb68b | pbrook | |
65 | 210f41ba | aliguori | void qemu_announce_self(void); |
66 | 210f41ba | aliguori | |
67 | d6f4ade2 | Paolo Bonzini | void main_loop_wait(int nonblocking); |
68 | 87ecb68b | pbrook | |
69 | dc912121 | Alex Williamson | bool qemu_savevm_state_blocked(Monitor *mon);
|
70 | f327aa0c | Jan Kiszka | int qemu_savevm_state_begin(Monitor *mon, QEMUFile *f, int blk_enable, |
71 | f327aa0c | Jan Kiszka | int shared);
|
72 | f327aa0c | Jan Kiszka | int qemu_savevm_state_iterate(Monitor *mon, QEMUFile *f);
|
73 | f327aa0c | Jan Kiszka | int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f);
|
74 | f327aa0c | Jan Kiszka | void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f);
|
75 | 9366f418 | aliguori | int qemu_loadvm_state(QEMUFile *f);
|
76 | 9366f418 | aliguori | |
77 | 87ecb68b | pbrook | /* SLIRP */
|
78 | 376253ec | aliguori | void do_info_slirp(Monitor *mon);
|
79 | 87ecb68b | pbrook | |
80 | 993fbfdb | Anthony Liguori | typedef enum DisplayType |
81 | 993fbfdb | Anthony Liguori | { |
82 | 993fbfdb | Anthony Liguori | DT_DEFAULT, |
83 | 993fbfdb | Anthony Liguori | DT_CURSES, |
84 | 993fbfdb | Anthony Liguori | DT_SDL, |
85 | 993fbfdb | Anthony Liguori | DT_NOGRAPHIC, |
86 | 4171d32e | Jes Sorensen | DT_NONE, |
87 | 993fbfdb | Anthony Liguori | } DisplayType; |
88 | 993fbfdb | Anthony Liguori | |
89 | d399f677 | Paolo Bonzini | extern int autostart; |
90 | 87ecb68b | pbrook | extern int bios_size; |
91 | 86176759 | Zachary Amsden | |
92 | 86176759 | Zachary Amsden | typedef enum { |
93 | a19cbfb3 | Gerd Hoffmann | VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL, |
94 | 86176759 | Zachary Amsden | } VGAInterfaceType; |
95 | 86176759 | Zachary Amsden | |
96 | 86176759 | Zachary Amsden | extern int vga_interface_type; |
97 | 86176759 | Zachary Amsden | #define cirrus_vga_enabled (vga_interface_type == VGA_CIRRUS)
|
98 | 86176759 | Zachary Amsden | #define std_vga_enabled (vga_interface_type == VGA_STD)
|
99 | 86176759 | Zachary Amsden | #define xenfb_enabled (vga_interface_type == VGA_XENFB)
|
100 | 86176759 | Zachary Amsden | #define vmsvga_enabled (vga_interface_type == VGA_VMWARE)
|
101 | a19cbfb3 | Gerd Hoffmann | #define qxl_enabled (vga_interface_type == VGA_QXL)
|
102 | 86176759 | Zachary Amsden | |
103 | 87ecb68b | pbrook | extern int graphic_width; |
104 | 87ecb68b | pbrook | extern int graphic_height; |
105 | 87ecb68b | pbrook | extern int graphic_depth; |
106 | 6b35e7bf | Jes Sorensen | extern uint8_t irq0override;
|
107 | 993fbfdb | Anthony Liguori | extern DisplayType display_type;
|
108 | 87ecb68b | pbrook | extern const char *keyboard_layout; |
109 | 87ecb68b | pbrook | extern int win2k_install_hack; |
110 | 73822ec8 | aliguori | extern int rtc_td_hack; |
111 | 87ecb68b | pbrook | extern int alt_grab; |
112 | 0ca9f8a4 | Dustin Kirkland | extern int ctrl_grab; |
113 | 87ecb68b | pbrook | extern int usb_enabled; |
114 | 87ecb68b | pbrook | extern int smp_cpus; |
115 | 6be68d7e | Jes Sorensen | extern int max_cpus; |
116 | 87ecb68b | pbrook | extern int cursor_hide; |
117 | 87ecb68b | pbrook | extern int graphic_rotate; |
118 | 87ecb68b | pbrook | extern int no_quit; |
119 | a691d41a | Luiz Capitulino | extern int no_shutdown; |
120 | 87ecb68b | pbrook | extern int semihosting_enabled; |
121 | 87ecb68b | pbrook | extern int old_param; |
122 | 95387491 | Jan Kiszka | extern int boot_menu; |
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 | f18c16de | Luiz Capitulino | void drive_hot_add(Monitor *mon, const QDict *qdict); |
145 | b752daf0 | Markus Armbruster | void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); |
146 | 6f338c34 | aliguori | |
147 | 2ae63bda | Isaku Yamahata | /* pcie aer error injection */
|
148 | 2ae63bda | Isaku Yamahata | void pcie_aer_inject_error_print(Monitor *mon, const QObject *data); |
149 | 2ae63bda | Isaku Yamahata | int do_pcie_aer_inejct_error(Monitor *mon,
|
150 | 2ae63bda | Isaku Yamahata | const QDict *qdict, QObject **ret_data);
|
151 | 2ae63bda | Isaku Yamahata | |
152 | 87ecb68b | pbrook | /* serial ports */
|
153 | 87ecb68b | pbrook | |
154 | 87ecb68b | pbrook | #define MAX_SERIAL_PORTS 4 |
155 | 87ecb68b | pbrook | |
156 | 87ecb68b | pbrook | extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
|
157 | 87ecb68b | pbrook | |
158 | 87ecb68b | pbrook | /* parallel ports */
|
159 | 87ecb68b | pbrook | |
160 | 87ecb68b | pbrook | #define MAX_PARALLEL_PORTS 3 |
161 | 87ecb68b | pbrook | |
162 | 87ecb68b | pbrook | extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
|
163 | 87ecb68b | pbrook | |
164 | d54908a5 | Luiz Capitulino | void do_usb_add(Monitor *mon, const QDict *qdict); |
165 | d54908a5 | Luiz Capitulino | void do_usb_del(Monitor *mon, const QDict *qdict); |
166 | 376253ec | aliguori | void usb_info(Monitor *mon);
|
167 | 87ecb68b | pbrook | |
168 | 80cd3478 | Luiz Capitulino | void rtc_change_mon_event(struct tm *tm); |
169 | 80cd3478 | Luiz Capitulino | |
170 | aae9460e | Paul Brook | void register_devices(void); |
171 | aae9460e | Paul Brook | |
172 | 1ca4d09a | Gleb Natapov | void add_boot_device_path(int32_t bootindex, DeviceState *dev,
|
173 | 1ca4d09a | Gleb Natapov | const char *suffix); |
174 | 962630f2 | Gleb Natapov | char *get_boot_devices_list(uint32_t *size);
|
175 | 87ecb68b | pbrook | #endif |