[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 02/54] Provide runtime Target page information
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH v8 02/54] Provide runtime Target page information |
Date: |
Tue, 29 Sep 2015 09:37:26 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
The migration code generally is built target-independent, however
there are a few places where knowing the target page size would
avoid artificially moving stuff into migration/ram.c.
Provide 'qemu_target_page_bits()' that returns TARGET_PAGE_BITS
to other bits of code so that they can stay target-independent.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
---
exec.c | 10 ++++++++++
include/sysemu/sysemu.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/exec.c b/exec.c
index 47ada31..1852613 100644
--- a/exec.c
+++ b/exec.c
@@ -3468,6 +3468,16 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
}
return 0;
}
+
+/*
+ * Allows code that needs to deal with migration bitmaps etc to still be built
+ * target independent.
+ */
+size_t qemu_target_page_bits(void)
+{
+ return TARGET_PAGE_BITS;
+}
+
#endif
/*
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index c439975..3e5c3d1 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -70,6 +70,7 @@ void qemu_system_killed(int signal, pid_t pid);
void qemu_devices_reset(void);
void qemu_system_reset(bool report);
void qemu_system_guest_panicked(void);
+size_t qemu_target_page_bits(void);
void qemu_add_exit_notifier(Notifier *notify);
void qemu_remove_exit_notifier(Notifier *notify);
--
2.5.0
- [Qemu-devel] [PATCH v8 00/54] Postcopy implementation, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 02/54] Provide runtime Target page information,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH v8 01/54] Add postcopy documentation, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 04/54] Move configuration section writing, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 03/54] Init page sizes in qtest, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 06/54] Rename mis->file to from_src_file, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 05/54] qemu_ram_block_from_host, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 07/54] Add qemu_get_buffer_in_place to avoid copies some of the time, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 08/54] Add wrapper for setting blocking status on a QEMUFile, Dr. David Alan Gilbert (git), 2015/10/01