All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] arch_init/ram_load: add error message for block length mismatch
@ 2012-12-06 12:02 Alon Levy
  2012-12-06 12:08 ` [Qemu-devel] [PATCH v2] " Alon Levy
  2012-12-06 12:11 ` [Qemu-devel] [PATCH] " Orit Wasserman
  0 siblings, 2 replies; 6+ messages in thread
From: Alon Levy @ 2012-12-06 12:02 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 arch_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch_init.c b/arch_init.c
index e6effe8..84bca99 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -808,8 +808,10 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
                     QLIST_FOREACH(block, &ram_list.blocks, next) {
                         if (!strncmp(id, block->idstr, sizeof(id))) {
                             if (block->length != length) {
+                                fprintf(stderr, "Length mismatch: %s: %d "
+                                        "in != %d\n", id, length,
+                                        block->length);
                                 ret =  -EINVAL;
-                                goto done;
                             }
                             break;
                         }
-- 
1.8.0.1

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

* [Qemu-devel] [PATCH v2] arch_init/ram_load: add error message for block length mismatch
  2012-12-06 12:02 [Qemu-devel] [PATCH] arch_init/ram_load: add error message for block length mismatch Alon Levy
@ 2012-12-06 12:08 ` Alon Levy
  2012-12-06 12:18   ` Orit Wasserman
  2012-12-18 16:00   ` Stefan Hajnoczi
  2012-12-06 12:11 ` [Qemu-devel] [PATCH] " Orit Wasserman
  1 sibling, 2 replies; 6+ messages in thread
From: Alon Levy @ 2012-12-06 12:08 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial

Signed-off-by: Alon Levy <alevy@redhat.com>
---
Please ignore previous version, accidentally removed goto done and used wrong
format size specifiers.

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

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

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

* Re: [Qemu-devel] [PATCH] arch_init/ram_load: add error message for block length mismatch
  2012-12-06 12:02 [Qemu-devel] [PATCH] arch_init/ram_load: add error message for block length mismatch Alon Levy
  2012-12-06 12:08 ` [Qemu-devel] [PATCH v2] " Alon Levy
@ 2012-12-06 12:11 ` Orit Wasserman
  2012-12-06 12:17   ` Alon Levy
  1 sibling, 1 reply; 6+ messages in thread
From: Orit Wasserman @ 2012-12-06 12:11 UTC (permalink / raw)
  To: Alon Levy; +Cc: qemu-trivial, qemu-devel

On 12/06/2012 02:02 PM, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
>  arch_init.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch_init.c b/arch_init.c
> index e6effe8..84bca99 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -808,8 +808,10 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
>                      QLIST_FOREACH(block, &ram_list.blocks, next) {
>                          if (!strncmp(id, block->idstr, sizeof(id))) {
>                              if (block->length != length) {
> +                                fprintf(stderr, "Length mismatch: %s: %d "
> +                                        "in != %d\n", id, length,
> +                                        block->length);
>                                  ret =  -EINVAL;
> -                                goto done;
>                              }
>                              break;
>                          }
> 
Reviewed-by: Orit Wasserman <owasserm@redhat.com>

But the real question is what did we break this time? can it be fixed?

Orit

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

* Re: [Qemu-devel] [PATCH] arch_init/ram_load: add error message for block length mismatch
  2012-12-06 12:11 ` [Qemu-devel] [PATCH] " Orit Wasserman
@ 2012-12-06 12:17   ` Alon Levy
  0 siblings, 0 replies; 6+ messages in thread
From: Alon Levy @ 2012-12-06 12:17 UTC (permalink / raw)
  To: Orit Wasserman; +Cc: qemu-trivial, qemu-devel

> On 12/06/2012 02:02 PM, Alon Levy wrote:
> > Signed-off-by: Alon Levy <alevy@redhat.com>
> > ---
> >  arch_init.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch_init.c b/arch_init.c
> > index e6effe8..84bca99 100644
> > --- a/arch_init.c
> > +++ b/arch_init.c
> > @@ -808,8 +808,10 @@ static int ram_load(QEMUFile *f, void *opaque,
> > int version_id)
> >                      QLIST_FOREACH(block, &ram_list.blocks, next) {
> >                          if (!strncmp(id, block->idstr,
> >                          sizeof(id))) {
> >                              if (block->length != length) {
> > +                                fprintf(stderr, "Length mismatch:
> > %s: %d "
> > +                                        "in != %d\n", id, length,
> > +                                        block->length);
> >                                  ret =  -EINVAL;
> > -                                goto done;
> >                              }
> >                              break;
> >                          }
> > 
> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
> 
> But the real question is what did we break this time? can it be
> fixed?

qxl - we changed the rom bar size for all revisions of the device. I'm checking the upstream fix and will send it when I'm happy.

> 
> Orit
> 
> 

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

* Re: [Qemu-devel] [PATCH v2] arch_init/ram_load: add error message for block length mismatch
  2012-12-06 12:08 ` [Qemu-devel] [PATCH v2] " Alon Levy
@ 2012-12-06 12:18   ` Orit Wasserman
  2012-12-18 16:00   ` Stefan Hajnoczi
  1 sibling, 0 replies; 6+ messages in thread
From: Orit Wasserman @ 2012-12-06 12:18 UTC (permalink / raw)
  To: Alon Levy; +Cc: qemu-trivial, qemu-devel

On 12/06/2012 02:08 PM, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
> Please ignore previous version, accidentally removed goto done and used wrong
> format size specifiers.
missed that too, but I'm adding better error messages anyway :)
> 
>  arch_init.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch_init.c b/arch_init.c
> index e6effe8..fba24f3 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
>                      QLIST_FOREACH(block, &ram_list.blocks, next) {
>                          if (!strncmp(id, block->idstr, sizeof(id))) {
>                              if (block->length != length) {
> +                                fprintf(stderr, "Length mismatch: %s: %ld "
> +                                        "in != %ld\n", id, length,
> +                                        block->length);
>                                  ret =  -EINVAL;
>                                  goto done;
>                              }
> 

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

* Re: [Qemu-devel] [PATCH v2] arch_init/ram_load: add error message for block length mismatch
  2012-12-06 12:08 ` [Qemu-devel] [PATCH v2] " Alon Levy
  2012-12-06 12:18   ` Orit Wasserman
@ 2012-12-18 16:00   ` Stefan Hajnoczi
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-12-18 16:00 UTC (permalink / raw)
  To: Alon Levy; +Cc: qemu-trivial, qemu-devel

On Thu, Dec 06, 2012 at 02:08:20PM +0200, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
> Please ignore previous version, accidentally removed goto done and used wrong
> format size specifiers.
> 
>  arch_init.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch_init.c b/arch_init.c
> index e6effe8..fba24f3 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
>                      QLIST_FOREACH(block, &ram_list.blocks, next) {
>                          if (!strncmp(id, block->idstr, sizeof(id))) {
>                              if (block->length != length) {
> +                                fprintf(stderr, "Length mismatch: %s: %ld "
> +                                        "in != %ld\n", id, length,
> +                                        block->length);

Please use RAM_ADDR_FMT for ram_addr_t values.

Stefan

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

end of thread, other threads:[~2012-12-18 16:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-06 12:02 [Qemu-devel] [PATCH] arch_init/ram_load: add error message for block length mismatch Alon Levy
2012-12-06 12:08 ` [Qemu-devel] [PATCH v2] " Alon Levy
2012-12-06 12:18   ` Orit Wasserman
2012-12-18 16:00   ` Stefan Hajnoczi
2012-12-06 12:11 ` [Qemu-devel] [PATCH] " Orit Wasserman
2012-12-06 12:17   ` Alon Levy

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.