* [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent
@ 2017-05-17 16:08 Juan Quintela
2017-05-17 16:08 ` [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size() Juan Quintela
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Juan Quintela @ 2017-05-17 16:08 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Hi
Only reason that ram.c is compiled by target is because it use
TARGET_PAGE_BITS. As we already have a function to export
TARGET_PAGE_SIZE, do the same.
After this, we can make it target independent.
Please, review.
Later, Juan.
Juan Quintela (2):
exec: Create include for target_page_size()
migration: Make savevm.c target independent
Makefile.target | 2 +-
exec.c | 10 ++++++++++
include/exec/target_page.h | 22 ++++++++++++++++++++++
include/sysemu/sysemu.h | 1 -
migration/Makefile.objs | 2 +-
migration/migration.c | 1 +
migration/postcopy-ram.c | 1 +
migration/savevm.c | 15 ++++++++-------
8 files changed, 44 insertions(+), 10 deletions(-)
create mode 100644 include/exec/target_page.h
--
2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size()
2017-05-17 16:08 [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent Juan Quintela
@ 2017-05-17 16:08 ` Juan Quintela
2017-05-18 14:27 ` Dr. David Alan Gilbert
2017-05-17 16:08 ` [Qemu-devel] [PATCH 2/2] migration: Make savevm.c target independent Juan Quintela
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Juan Quintela @ 2017-05-17 16:08 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
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>
---
exec.c | 1 +
include/exec/target_page.h | 20 ++++++++++++++++++++
include/sysemu/sysemu.h | 1 -
migration/migration.c | 1 +
migration/postcopy-ram.c | 1 +
migration/savevm.c | 1 +
6 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 include/exec/target_page.h
diff --git a/exec.c b/exec.c
index eac6085..e9a201a 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 0000000..0961591
--- /dev/null
+++ b/include/exec/target_page.h
@@ -0,0 +1,20 @@
+
+ /*
+ * QEMU exec target page sizes
+ *
+ * Copyright IBM, Corp. 2008
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. 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 765358e..ed8fe3b 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 75a728a..4429a8c 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 64f09e1..82f719a 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 8565103..8763700 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"
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 2/2] migration: Make savevm.c target independent
2017-05-17 16:08 [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent Juan Quintela
2017-05-17 16:08 ` [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size() Juan Quintela
@ 2017-05-17 16:08 ` Juan Quintela
2017-05-18 15:00 ` Dr. David Alan Gilbert
2017-05-18 10:04 ` [Qemu-devel] [PATCH 0/2] Make migration/ram.c " Juan Quintela
2017-05-18 10:31 ` Peter Xu
3 siblings, 1 reply; 7+ messages in thread
From: Juan Quintela @ 2017-05-17 16:08 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
It only needed TARGET_PAGE_SIZE/BITS/BITS_MIN values, so just export
them from exec.h
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
Makefile.target | 2 +-
exec.c | 9 +++++++++
include/exec/target_page.h | 2 ++
migration/Makefile.objs | 2 +-
migration/savevm.c | 14 +++++++-------
5 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 465a633..ce8dfe4 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -146,7 +146,7 @@ obj-$(CONFIG_KVM) += kvm-all.o
obj-y += memory.o cputlb.o
obj-y += memory_mapping.o
obj-y += dump.o
-obj-y += migration/ram.o migration/savevm.o
+obj-y += migration/ram.o
LIBS := $(libs_softmmu) $(LIBS)
# Hardware support
diff --git a/exec.c b/exec.c
index e9a201a..447ac63 100644
--- a/exec.c
+++ b/exec.c
@@ -3387,6 +3387,15 @@ size_t qemu_target_page_size(void)
return TARGET_PAGE_SIZE;
}
+int qemu_target_page_bits(void)
+{
+ return TARGET_PAGE_BITS;
+}
+
+int qemu_target_page_bits_min(void)
+{
+ return TARGET_PAGE_BITS_MIN;
+}
#endif
/*
diff --git a/include/exec/target_page.h b/include/exec/target_page.h
index 0961591..e3a19cc 100644
--- a/include/exec/target_page.h
+++ b/include/exec/target_page.h
@@ -16,5 +16,7 @@
#define EXEC_TARGET_PAGE_H
size_t qemu_target_page_size(void);
+int qemu_target_page_bits(void);
+int qemu_target_page_bits_min(void);
#endif
diff --git a/migration/Makefile.objs b/migration/Makefile.objs
index 3272415..90f8c1f 100644
--- a/migration/Makefile.objs
+++ b/migration/Makefile.objs
@@ -1,5 +1,5 @@
common-obj-y += migration.o socket.o fd.o exec.o
-common-obj-y += tls.o channel.o
+common-obj-y += tls.o channel.o savevm.o
common-obj-y += colo-comm.o colo.o colo-failover.o
common-obj-y += vmstate.o vmstate-types.o page_cache.o
common-obj-y += qemu-file.o
diff --git a/migration/savevm.c b/migration/savevm.c
index 8763700..d971e5e 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -27,7 +27,6 @@
*/
#include "qemu/osdep.h"
-#include "cpu.h"
#include "hw/boards.h"
#include "hw/hw.h"
#include "hw/qdev.h"
@@ -288,7 +287,7 @@ static void configuration_pre_save(void *opaque)
state->len = strlen(current_name);
state->name = current_name;
- state->target_page_bits = TARGET_PAGE_BITS;
+ state->target_page_bits = qemu_target_page_bits();
}
static int configuration_pre_load(void *opaque)
@@ -299,7 +298,7 @@ static int configuration_pre_load(void *opaque)
* predates the variable-target-page-bits support and is using the
* minimum possible value for this CPU.
*/
- state->target_page_bits = TARGET_PAGE_BITS_MIN;
+ state->target_page_bits = qemu_target_page_bits_min();
return 0;
}
@@ -314,9 +313,9 @@ static int configuration_post_load(void *opaque, int version_id)
return -EINVAL;
}
- if (state->target_page_bits != TARGET_PAGE_BITS) {
+ if (state->target_page_bits != qemu_target_page_bits()) {
error_report("Received TARGET_PAGE_BITS is %d but local is %d",
- state->target_page_bits, TARGET_PAGE_BITS);
+ state->target_page_bits, qemu_target_page_bits());
return -EINVAL;
}
@@ -332,7 +331,8 @@ static int configuration_post_load(void *opaque, int version_id)
*/
static bool vmstate_target_page_bits_needed(void *opaque)
{
- return TARGET_PAGE_BITS > TARGET_PAGE_BITS_MIN;
+ return qemu_target_page_bits()
+ > qemu_target_page_bits_min();
}
static const VMStateDescription vmstate_target_page_bits = {
@@ -1138,7 +1138,7 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
}
vmdesc = qjson_new();
- json_prop_int(vmdesc, "page_size", TARGET_PAGE_SIZE);
+ json_prop_int(vmdesc, "page_size", qemu_target_page_size());
json_start_array(vmdesc, "devices");
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent
2017-05-17 16:08 [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent Juan Quintela
2017-05-17 16:08 ` [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size() Juan Quintela
2017-05-17 16:08 ` [Qemu-devel] [PATCH 2/2] migration: Make savevm.c target independent Juan Quintela
@ 2017-05-18 10:04 ` Juan Quintela
2017-05-18 10:31 ` Peter Xu
3 siblings, 0 replies; 7+ messages in thread
From: Juan Quintela @ 2017-05-18 10:04 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Juan Quintela <quintela@redhat.com> wrote:
> Hi
Hi
And I got it wrong subject.
What got target independent is savevm.c
ram.c needs to "cleanup" first include/exec/ram_addr.h
Sorry, Juan.
>
> Only reason that ram.c is compiled by target is because it use
> TARGET_PAGE_BITS. As we already have a function to export
> TARGET_PAGE_SIZE, do the same.
> After this, we can make it target independent.
>
> Please, review.
>
> Later, Juan.
>
>
>
>
> Juan Quintela (2):
> exec: Create include for target_page_size()
> migration: Make savevm.c target independent
>
> Makefile.target | 2 +-
> exec.c | 10 ++++++++++
> include/exec/target_page.h | 22 ++++++++++++++++++++++
> include/sysemu/sysemu.h | 1 -
> migration/Makefile.objs | 2 +-
> migration/migration.c | 1 +
> migration/postcopy-ram.c | 1 +
> migration/savevm.c | 15 ++++++++-------
> 8 files changed, 44 insertions(+), 10 deletions(-)
> create mode 100644 include/exec/target_page.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent
2017-05-17 16:08 [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent Juan Quintela
` (2 preceding siblings ...)
2017-05-18 10:04 ` [Qemu-devel] [PATCH 0/2] Make migration/ram.c " Juan Quintela
@ 2017-05-18 10:31 ` Peter Xu
3 siblings, 0 replies; 7+ messages in thread
From: Peter Xu @ 2017-05-18 10:31 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, dgilbert, lvivier
On Wed, May 17, 2017 at 06:08:02PM +0200, Juan Quintela wrote:
> Hi
>
> Only reason that ram.c is compiled by target is because it use
> TARGET_PAGE_BITS. As we already have a function to export
> TARGET_PAGE_SIZE, do the same.
> After this, we can make it target independent.
>
> Please, review.
>
> Later, Juan.
>
>
>
>
> Juan Quintela (2):
> exec: Create include for target_page_size()
> migration: Make savevm.c target independent
>
> Makefile.target | 2 +-
> exec.c | 10 ++++++++++
> include/exec/target_page.h | 22 ++++++++++++++++++++++
> include/sysemu/sysemu.h | 1 -
> migration/Makefile.objs | 2 +-
> migration/migration.c | 1 +
> migration/postcopy-ram.c | 1 +
> migration/savevm.c | 15 ++++++++-------
> 8 files changed, 44 insertions(+), 10 deletions(-)
> create mode 100644 include/exec/target_page.h
Though I am not 100% sure of the relationship between TARGET_PAGE_*,
qemu_target_page_*(), and exec/poison.h, but at least we already have
qemu_target_page_size(), and this patch moves savevm.c out of
arch-dependent list, which does make sense. So:
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size()
2017-05-17 16:08 ` [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size() Juan Quintela
@ 2017-05-18 14:27 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 7+ messages in thread
From: Dr. David Alan Gilbert @ 2017-05-18 14:27 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, lvivier, peterx
* Juan Quintela (quintela@redhat.com) wrote:
> 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>
> ---
> exec.c | 1 +
> include/exec/target_page.h | 20 ++++++++++++++++++++
> include/sysemu/sysemu.h | 1 -
> migration/migration.c | 1 +
> migration/postcopy-ram.c | 1 +
> migration/savevm.c | 1 +
> 6 files changed, 24 insertions(+), 1 deletion(-)
> create mode 100644 include/exec/target_page.h
>
> diff --git a/exec.c b/exec.c
> index eac6085..e9a201a 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 0000000..0961591
> --- /dev/null
> +++ b/include/exec/target_page.h
> @@ -0,0 +1,20 @@
> +
> + /*
> + * QEMU exec target page sizes
> + *
> + * Copyright IBM, Corp. 2008
> + *
> + * Authors:
> + * Anthony Liguori <aliguori@us.ibm.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2. See
> + * the COPYING file in the top-level directory.
Hmm, no.
> + */
> +
> +#ifndef EXEC_TARGET_PAGE_H
> +#define EXEC_TARGET_PAGE_H
> +
> +size_t qemu_target_page_size(void);
We have *one* line from sysemu.h here, lets look at the history of it;
a certain Juan Quintela in commit 20afaed two months ago changed it from
qemu_target_page_bits to qemu_target_page_size; which you're about to
add back. But that one line came from you.
Before that rename, it came from my 038629a6992403269 in late 2015.
So either way, it's certainly not a 2008 copyright authored by Anthony.
sysemu.h doesn't have a copyright header and LICENSE says that's gplv2
or later (which may or may not be correct given the age of sysemu.h)
Dave
> +#endif
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index 765358e..ed8fe3b 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 75a728a..4429a8c 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 64f09e1..82f719a 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 8565103..8763700 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"
> --
> 2.9.3
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] migration: Make savevm.c target independent
2017-05-17 16:08 ` [Qemu-devel] [PATCH 2/2] migration: Make savevm.c target independent Juan Quintela
@ 2017-05-18 15:00 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 7+ messages in thread
From: Dr. David Alan Gilbert @ 2017-05-18 15:00 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, lvivier, peterx
* Juan Quintela (quintela@redhat.com) wrote:
> It only needed TARGET_PAGE_SIZE/BITS/BITS_MIN values, so just export
> them from exec.h
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> Makefile.target | 2 +-
> exec.c | 9 +++++++++
> include/exec/target_page.h | 2 ++
> migration/Makefile.objs | 2 +-
> migration/savevm.c | 14 +++++++-------
> 5 files changed, 20 insertions(+), 9 deletions(-)
>
> diff --git a/Makefile.target b/Makefile.target
> index 465a633..ce8dfe4 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -146,7 +146,7 @@ obj-$(CONFIG_KVM) += kvm-all.o
> obj-y += memory.o cputlb.o
> obj-y += memory_mapping.o
> obj-y += dump.o
> -obj-y += migration/ram.o migration/savevm.o
> +obj-y += migration/ram.o
> LIBS := $(libs_softmmu) $(LIBS)
>
> # Hardware support
> diff --git a/exec.c b/exec.c
> index e9a201a..447ac63 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -3387,6 +3387,15 @@ size_t qemu_target_page_size(void)
> return TARGET_PAGE_SIZE;
> }
>
> +int qemu_target_page_bits(void)
> +{
> + return TARGET_PAGE_BITS;
> +}
> +
> +int qemu_target_page_bits_min(void)
> +{
> + return TARGET_PAGE_BITS_MIN;
> +}
> #endif
>
> /*
> diff --git a/include/exec/target_page.h b/include/exec/target_page.h
> index 0961591..e3a19cc 100644
> --- a/include/exec/target_page.h
> +++ b/include/exec/target_page.h
> @@ -16,5 +16,7 @@
> #define EXEC_TARGET_PAGE_H
>
> size_t qemu_target_page_size(void);
> +int qemu_target_page_bits(void);
> +int qemu_target_page_bits_min(void);
>
> #endif
> diff --git a/migration/Makefile.objs b/migration/Makefile.objs
> index 3272415..90f8c1f 100644
> --- a/migration/Makefile.objs
> +++ b/migration/Makefile.objs
> @@ -1,5 +1,5 @@
> common-obj-y += migration.o socket.o fd.o exec.o
> -common-obj-y += tls.o channel.o
> +common-obj-y += tls.o channel.o savevm.o
> common-obj-y += colo-comm.o colo.o colo-failover.o
> common-obj-y += vmstate.o vmstate-types.o page_cache.o
> common-obj-y += qemu-file.o
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 8763700..d971e5e 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -27,7 +27,6 @@
> */
>
> #include "qemu/osdep.h"
> -#include "cpu.h"
> #include "hw/boards.h"
> #include "hw/hw.h"
> #include "hw/qdev.h"
> @@ -288,7 +287,7 @@ static void configuration_pre_save(void *opaque)
>
> state->len = strlen(current_name);
> state->name = current_name;
> - state->target_page_bits = TARGET_PAGE_BITS;
> + state->target_page_bits = qemu_target_page_bits();
> }
>
> static int configuration_pre_load(void *opaque)
> @@ -299,7 +298,7 @@ static int configuration_pre_load(void *opaque)
> * predates the variable-target-page-bits support and is using the
> * minimum possible value for this CPU.
> */
> - state->target_page_bits = TARGET_PAGE_BITS_MIN;
> + state->target_page_bits = qemu_target_page_bits_min();
> return 0;
> }
>
> @@ -314,9 +313,9 @@ static int configuration_post_load(void *opaque, int version_id)
> return -EINVAL;
> }
>
> - if (state->target_page_bits != TARGET_PAGE_BITS) {
> + if (state->target_page_bits != qemu_target_page_bits()) {
> error_report("Received TARGET_PAGE_BITS is %d but local is %d",
> - state->target_page_bits, TARGET_PAGE_BITS);
> + state->target_page_bits, qemu_target_page_bits());
> return -EINVAL;
> }
>
> @@ -332,7 +331,8 @@ static int configuration_post_load(void *opaque, int version_id)
> */
> static bool vmstate_target_page_bits_needed(void *opaque)
> {
> - return TARGET_PAGE_BITS > TARGET_PAGE_BITS_MIN;
> + return qemu_target_page_bits()
> + > qemu_target_page_bits_min();
> }
>
> static const VMStateDescription vmstate_target_page_bits = {
> @@ -1138,7 +1138,7 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
> }
>
> vmdesc = qjson_new();
> - json_prop_int(vmdesc, "page_size", TARGET_PAGE_SIZE);
> + json_prop_int(vmdesc, "page_size", qemu_target_page_size());
> json_start_array(vmdesc, "devices");
> QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
>
> --
> 2.9.3
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-05-18 15:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 16:08 [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent Juan Quintela
2017-05-17 16:08 ` [Qemu-devel] [PATCH 1/2] exec: Create include for target_page_size() Juan Quintela
2017-05-18 14:27 ` Dr. David Alan Gilbert
2017-05-17 16:08 ` [Qemu-devel] [PATCH 2/2] migration: Make savevm.c target independent Juan Quintela
2017-05-18 15:00 ` Dr. David Alan Gilbert
2017-05-18 10:04 ` [Qemu-devel] [PATCH 0/2] Make migration/ram.c " Juan Quintela
2017-05-18 10:31 ` Peter Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.