2
0
Эх сурвалжийг харах

exec: Create include for target_page_size()

That is the only function that we need from exec.c, and having to
include the whole sysemu.h for this.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

---

/me leans to be less sloppy with copyright notices
thanks Dave
Juan Quintela 8 жил өмнө
parent
commit
51180423a2

+ 1 - 0
exec.c

@@ -24,6 +24,7 @@
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/target_page.h"
 #include "tcg.h"
 #include "tcg.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-core.h"
 #if !defined(CONFIG_USER_ONLY)
 #if !defined(CONFIG_USER_ONLY)

+ 19 - 0
include/exec/target_page.h

@@ -0,0 +1,19 @@
+/*
+ * Target page sizes and friends for non target files
+ *
+ * Copyright (c) 2017 Red Hat Inc
+ *
+ * Authors:
+ *  David Alan Gilbert <dgilbert@redhat.com>
+ *  Juan Quintela <quintela@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef EXEC_TARGET_PAGE_H
+#define EXEC_TARGET_PAGE_H
+
+size_t qemu_target_page_size(void);
+
+#endif

+ 0 - 1
include/sysemu/sysemu.h

@@ -67,7 +67,6 @@ int qemu_reset_requested_get(void);
 void qemu_system_killed(int signal, pid_t pid);
 void qemu_system_killed(int signal, pid_t pid);
 void qemu_system_reset(bool report);
 void qemu_system_reset(bool report);
 void qemu_system_guest_panicked(GuestPanicInformation *info);
 void qemu_system_guest_panicked(GuestPanicInformation *info);
-size_t qemu_target_page_size(void);
 
 
 void qemu_add_exit_notifier(Notifier *notify);
 void qemu_add_exit_notifier(Notifier *notify);
 void qemu_remove_exit_notifier(Notifier *notify);
 void qemu_remove_exit_notifier(Notifier *notify);

+ 1 - 0
migration/migration.c

@@ -37,6 +37,7 @@
 #include "qom/cpu.h"
 #include "qom/cpu.h"
 #include "exec/memory.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "exec/address-spaces.h"
+#include "exec/target_page.h"
 #include "io/channel-buffer.h"
 #include "io/channel-buffer.h"
 #include "io/channel-tls.h"
 #include "io/channel-tls.h"
 #include "migration/colo.h"
 #include "migration/colo.h"

+ 1 - 0
migration/postcopy-ram.c

@@ -19,6 +19,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
+#include "exec/target_page.h"
 #include "migration/migration.h"
 #include "migration/migration.h"
 #include "migration/qemu-file.h"
 #include "migration/qemu-file.h"
 #include "postcopy-ram.h"
 #include "postcopy-ram.h"

+ 1 - 0
migration/savevm.c

@@ -43,6 +43,7 @@
 #include "qemu/queue.h"
 #include "qemu/queue.h"
 #include "sysemu/cpus.h"
 #include "sysemu/cpus.h"
 #include "exec/memory.h"
 #include "exec/memory.h"
+#include "exec/target_page.h"
 #include "qmp-commands.h"
 #include "qmp-commands.h"
 #include "trace.h"
 #include "trace.h"
 #include "qemu/bitops.h"
 #include "qemu/bitops.h"