qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id()
@ 2011-01-26  9:45 Isaku Yamahata
  2011-01-26 14:04 ` [Qemu-devel] " Alex Williamson
  0 siblings, 1 reply; 3+ messages in thread
From: Isaku Yamahata @ 2011-01-26  9:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: yamahata, Alex Williamson

This patch unbreaks 7685ee6abcb939104801f84b3fe9645412528088.
With the changeset, more than one instances of same device on bus
that provides get_dev_path method can't be created because it hits
the assertion.
This patch removes the assertion whose assumption isn't correct.

Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 savevm.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/savevm.c b/savevm.c
index fcd8db4..cd29eb8 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1126,7 +1126,6 @@ int register_savevm_live(DeviceState *dev,
     } else {
         se->instance_id = instance_id;
     }
-    assert(!se->compat || se->instance_id == 0);
     /* add at the end of list */
     QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
     return 0;
@@ -1236,7 +1235,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
     } else {
         se->instance_id = instance_id;
     }
-    assert(!se->compat || se->instance_id == 0);
     /* add at the end of list */
     QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
     return 0;
-- 
1.7.1.1

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

* [Qemu-devel] Re: [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id()
  2011-01-26  9:45 [Qemu-devel] [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id() Isaku Yamahata
@ 2011-01-26 14:04 ` Alex Williamson
  2011-01-27  3:41   ` Isaku Yamahata
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2011-01-26 14:04 UTC (permalink / raw)
  To: Isaku Yamahata; +Cc: qemu-devel

On Wed, 2011-01-26 at 18:45 +0900, Isaku Yamahata wrote:
> This patch unbreaks 7685ee6abcb939104801f84b3fe9645412528088.
> With the changeset, more than one instances of same device on bus
> that provides get_dev_path method can't be created because it hits
> the assertion.
> This patch removes the assertion whose assumption isn't correct.

Can you give an example of where this is needed?  The point of
get_dev_path is that when it's available, it's supposed to provide a
unique string per device.  Since get_dev_path is really only implemented
for PCI, does this mean you have two independent devices at the same PCI
address?  Thanks,

Alex

> Cc: Alex Williamson <alex.williamson@redhat.com>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> ---
>  savevm.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/savevm.c b/savevm.c
> index fcd8db4..cd29eb8 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1126,7 +1126,6 @@ int register_savevm_live(DeviceState *dev,
>      } else {
>          se->instance_id = instance_id;
>      }
> -    assert(!se->compat || se->instance_id == 0);
>      /* add at the end of list */
>      QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
>      return 0;
> @@ -1236,7 +1235,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
>      } else {
>          se->instance_id = instance_id;
>      }
> -    assert(!se->compat || se->instance_id == 0);
>      /* add at the end of list */
>      QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
>      return 0;

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

* [Qemu-devel] Re: [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id()
  2011-01-26 14:04 ` [Qemu-devel] " Alex Williamson
@ 2011-01-27  3:41   ` Isaku Yamahata
  0 siblings, 0 replies; 3+ messages in thread
From: Isaku Yamahata @ 2011-01-27  3:41 UTC (permalink / raw)
  To: Alex Williamson; +Cc: qemu-devel

I sent the patch out too early.
I found the issue is in pcibus_get_dev_path(). Sorry for noise.

On Wed, Jan 26, 2011 at 07:04:51AM -0700, Alex Williamson wrote:
> On Wed, 2011-01-26 at 18:45 +0900, Isaku Yamahata wrote:
> > This patch unbreaks 7685ee6abcb939104801f84b3fe9645412528088.
> > With the changeset, more than one instances of same device on bus
> > that provides get_dev_path method can't be created because it hits
> > the assertion.
> > This patch removes the assertion whose assumption isn't correct.
> 
> Can you give an example of where this is needed?  The point of
> get_dev_path is that when it's available, it's supposed to provide a
> unique string per device.  Since get_dev_path is really only implemented
> for PCI, does this mean you have two independent devices at the same PCI
> address?  Thanks,
> 
> Alex
> 
> > Cc: Alex Williamson <alex.williamson@redhat.com>
> > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> > ---
> >  savevm.c |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> > 
> > diff --git a/savevm.c b/savevm.c
> > index fcd8db4..cd29eb8 100644
> > --- a/savevm.c
> > +++ b/savevm.c
> > @@ -1126,7 +1126,6 @@ int register_savevm_live(DeviceState *dev,
> >      } else {
> >          se->instance_id = instance_id;
> >      }
> > -    assert(!se->compat || se->instance_id == 0);
> >      /* add at the end of list */
> >      QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
> >      return 0;
> > @@ -1236,7 +1235,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
> >      } else {
> >          se->instance_id = instance_id;
> >      }
> > -    assert(!se->compat || se->instance_id == 0);
> >      /* add at the end of list */
> >      QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
> >      return 0;
> 
> 
> 

-- 
yamahata

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

end of thread, other threads:[~2011-01-27  3:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26  9:45 [Qemu-devel] [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id() Isaku Yamahata
2011-01-26 14:04 ` [Qemu-devel] " Alex Williamson
2011-01-27  3:41   ` Isaku Yamahata

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