qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] arch_init/ram_load: add error message for block length mismatch
@ 2013-05-12 11:16 Alon Levy
  2013-05-13  8:57 ` Juan Quintela
  0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2013-05-12 11:16 UTC (permalink / raw)
  To: qemu-devel, shajnocz, owasserm

Makes it easier to debug situations where the source and target have
different ram blocks in a device and migration fails due to that, for
instance a BAR size change on a PCI device.

Signed-off-by: Alon Levy <alevy@redhat.com>
---
v3: use RAM_ADDR_FMT

 arch_init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch_init.c b/arch_init.c
index 49c5dc2..cd27fcf 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
                     QTAILQ_FOREACH(block, &ram_list.blocks, next) {
                         if (!strncmp(id, block->idstr, sizeof(id))) {
                             if (block->length != length) {
+                                fprintf(stderr, "Length mismatch: %s: %ld "
+                                        "in != " RAM_ADDR_FMT "\n", id, length,
+                                        block->length);
                                 ret =  -EINVAL;
                                 goto done;
                             }
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v3] arch_init/ram_load: add error message for block length mismatch
  2013-05-12 11:16 [Qemu-devel] [PATCH v3] arch_init/ram_load: add error message for block length mismatch Alon Levy
@ 2013-05-13  8:57 ` Juan Quintela
  0 siblings, 0 replies; 2+ messages in thread
From: Juan Quintela @ 2013-05-13  8:57 UTC (permalink / raw)
  To: Alon Levy; +Cc: owasserm, shajnocz, qemu-devel

Alon Levy <alevy@redhat.com> wrote:
> Makes it easier to debug situations where the source and target have
> different ram blocks in a device and migration fails due to that, for
> instance a BAR size change on a PCI device.
>
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
> v3: use RAM_ADDR_FMT
>
>  arch_init.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Reviewed-by: Juan Quintela <quintela@redhat.com>

will be included in next pull request. thanks.

> diff --git a/arch_init.c b/arch_init.c
> index 49c5dc2..cd27fcf 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
>                      QTAILQ_FOREACH(block, &ram_list.blocks, next) {
>                          if (!strncmp(id, block->idstr, sizeof(id))) {
>                              if (block->length != length) {
> +                                fprintf(stderr, "Length mismatch: %s: %ld "
> +                                        "in != " RAM_ADDR_FMT "\n", id, length,
> +                                        block->length);
>                                  ret =  -EINVAL;
>                                  goto done;
>                              }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-13  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-12 11:16 [Qemu-devel] [PATCH v3] arch_init/ram_load: add error message for block length mismatch Alon Levy
2013-05-13  8:57 ` Juan Quintela

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).