qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 08/11] Introduce host state v2
Date: Fri, 8 Apr 2011 23:48:31 +0300	[thread overview]
Message-ID: <BANLkTimxiLDPq_sW3e-_Sg+bEvCFyZCgbw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3883 bytes --]

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 <blauwirbel@gmail.com>
---
 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 #2: 0008-Introduce-host-state-v2.patch --]
[-- Type: text/x-diff, Size: 4364 bytes --]

From 2cb420fcc466183ee57a0dac1527a62b40c11b4d Mon Sep 17 00:00:00 2001
Message-Id: <2cb420fcc466183ee57a0dac1527a62b40c11b4d.1302295418.git.blauwirbel@gmail.com>
In-Reply-To: <6a1748c587d34b0ce37488596c68c4aee58a4638.1302295418.git.blauwirbel@gmail.com>
References: <6a1748c587d34b0ce37488596c68c4aee58a4638.1302295418.git.blauwirbel@gmail.com>
From: Blue Swirl <blauwirbel@gmail.com>
Date: Tue, 29 Mar 2011 20:43:02 +0000
Subject: [PATCH 08/11] Introduce host state v2

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 <blauwirbel@gmail.com>
---
 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


                 reply	other threads:[~2011-04-08 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimxiLDPq_sW3e-_Sg+bEvCFyZCgbw@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).