qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 08/11] Introduce host state v2


From: Blue Swirl
Subject: [Qemu-devel] [PATCH 08/11] Introduce host state v2
Date: Fri, 8 Apr 2011 23:48:31 +0300

Move host specific state (not guest visible except for PV, unrelated to
any specific target machine, general emulator state, VCPU or devices)
declarations to host-state.h.

Signed-off-by: Blue Swirl <address@hidden>
---
 host-state.h |   41 +++++++++++++++++++++++++++++++++++++++++
 sysemu.h     |   30 +-----------------------------
 2 files changed, 42 insertions(+), 29 deletions(-)
 create mode 100644 host-state.h

diff --git a/host-state.h b/host-state.h
new file mode 100644
index 0000000..6d1b4a1
--- /dev/null
+++ b/host-state.h
@@ -0,0 +1,41 @@
+#ifndef QEMU_HOST_STATE_H
+#define QEMU_HOST_STATE_H
+/*
+ * Host state: All state which is not guest visible except for PV,
+ * unrelated to any specific target machine, general emulator state,
+ * VCPU or devices.
+ */
+
+#include "notify.h"
+
+typedef enum DisplayType
+{
+    DT_DEFAULT,
+    DT_CURSES,
+    DT_SDL,
+    DT_NOGRAPHIC,
+    DT_NONE,
+} DisplayType;
+
+extern DisplayType display_type;
+extern int alt_grab;
+extern int ctrl_grab;
+extern int cursor_hide;
+extern int no_quit;
+extern int no_shutdown;
+extern const char *qemu_name;
+extern const char *keyboard_layout;
+
+void qemu_add_exit_notifier(Notifier *notify);
+void qemu_remove_exit_notifier(Notifier *notify);
+void qemu_system_killed(int signal, pid_t pid);
+void qemu_kill_report(void);
+
+/* SLIRP */
+void do_info_slirp(Monitor *mon);
+
+void do_usb_add(Monitor *mon, const QDict *qdict);
+void do_usb_del(Monitor *mon, const QDict *qdict);
+void usb_info(Monitor *mon);
+
+#endif
diff --git a/sysemu.h b/sysemu.h
index b0296a0..4bd1543 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -7,12 +7,12 @@
 #include "qemu-queue.h"
 #include "qemu-timer.h"
 #include "notify.h"
+#include "host-state.h"

 /* vl.c */
 extern const char *bios_name;

 extern int vm_running;
-extern const char *qemu_name;
 extern uint8_t qemu_uuid[];
 int qemu_uuid_parse(const char *str, uint8_t *uuid);
 #define UUID_FMT
"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
@@ -45,14 +45,9 @@ void qemu_system_vmstop_request(int reason);
 int qemu_shutdown_requested(void);
 int qemu_reset_requested(void);
 int qemu_powerdown_requested(void);
-void qemu_system_killed(int signal, pid_t pid);
-void qemu_kill_report(void);
 extern qemu_irq qemu_system_powerdown;
 void qemu_system_reset(void);

-void qemu_add_exit_notifier(Notifier *notify);
-void qemu_remove_exit_notifier(Notifier *notify);
-
 void qemu_add_machine_init_done_notifier(Notifier *notify);

 void do_savevm(Monitor *mon, const QDict *qdict);
@@ -72,18 +67,6 @@ int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f);
 void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f);
 int qemu_loadvm_state(QEMUFile *f);

-/* SLIRP */
-void do_info_slirp(Monitor *mon);
-
-typedef enum DisplayType
-{
-    DT_DEFAULT,
-    DT_CURSES,
-    DT_SDL,
-    DT_NOGRAPHIC,
-    DT_NONE,
-} DisplayType;
-
 extern int autostart;
 extern int bios_size;

@@ -102,19 +85,12 @@ extern int graphic_width;
 extern int graphic_height;
 extern int graphic_depth;
 extern uint8_t irq0override;
-extern DisplayType display_type;
-extern const char *keyboard_layout;
 extern int win2k_install_hack;
 extern int rtc_td_hack;
-extern int alt_grab;
-extern int ctrl_grab;
 extern int usb_enabled;
 extern int smp_cpus;
 extern int max_cpus;
-extern int cursor_hide;
 extern int graphic_rotate;
-extern int no_quit;
-extern int no_shutdown;
 extern int semihosting_enabled;
 extern int old_param;
 extern int boot_menu;
@@ -159,10 +135,6 @@ extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];

 extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];

-void do_usb_add(Monitor *mon, const QDict *qdict);
-void do_usb_del(Monitor *mon, const QDict *qdict);
-void usb_info(Monitor *mon);
-
 void rtc_change_mon_event(struct tm *tm);

 void register_devices(void);
-- 
1.7.2.5

Attachment: 0008-Introduce-host-state-v2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]