aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-04-24 20:50:19 +0200
committerJuan Quintela <quintela@redhat.com>2017-05-18 19:20:59 +0200
commit51180423a226adbd80d64bf75b8522256b1266f1 (patch)
treee7967c0784c46f80c5edd4535fd0c9516b690233
parent68ba3b07436396733f7313c81956410af6d17083 (diff)
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
-rw-r--r--exec.c1
-rw-r--r--include/exec/target_page.h19
-rw-r--r--include/sysemu/sysemu.h1
-rw-r--r--migration/migration.c1
-rw-r--r--migration/postcopy-ram.c1
-rw-r--r--migration/savevm.c1
6 files changed, 23 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 96e3ac98e1..de2961b583 100644
--- a/exec.c
+++ b/exec.c
@@ -24,6 +24,7 @@
#include "qemu/cutils.h"
#include "cpu.h"
#include "exec/exec-all.h"
+#include "exec/target_page.h"
#include "tcg.h"
#include "hw/qdev-core.h"
#if !defined(CONFIG_USER_ONLY)
diff --git a/include/exec/target_page.h b/include/exec/target_page.h
new file mode 100644
index 0000000000..626eda8029
--- /dev/null
+++ b/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
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 765358ea45..ed8fe3bf34 100644
--- a/include/sysemu/sysemu.h
+++ b/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_reset(bool report);
void qemu_system_guest_panicked(GuestPanicInformation *info);
-size_t qemu_target_page_size(void);
void qemu_add_exit_notifier(Notifier *notify);
void qemu_remove_exit_notifier(Notifier *notify);
diff --git a/migration/migration.c b/migration/migration.c
index 9fe474b63b..ad29e53400 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -37,6 +37,7 @@
#include "qom/cpu.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
+#include "exec/target_page.h"
#include "io/channel-buffer.h"
#include "io/channel-tls.h"
#include "migration/colo.h"
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index 0e2a996168..a37620dac6 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "exec/target_page.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "postcopy-ram.h"
diff --git a/migration/savevm.c b/migration/savevm.c
index 85651030b4..8763700bd5 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -43,6 +43,7 @@
#include "qemu/queue.h"
#include "sysemu/cpus.h"
#include "exec/memory.h"
+#include "exec/target_page.h"
#include "qmp-commands.h"
#include "trace.h"
#include "qemu/bitops.h"