From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54451 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pi5za-0002Ad-Gg for qemu-devel@nongnu.org; Wed, 26 Jan 2011 09:05:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pi5zT-0005MI-0Y for qemu-devel@nongnu.org; Wed, 26 Jan 2011 09:04:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pi5zS-0005Lt-Q3 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 09:04:54 -0500 From: Alex Williamson In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 26 Jan 2011 07:04:51 -0700 Message-ID: <1296050691.6390.2.camel@x201> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] savevm: unbreak register_savevm_live()/vmstate_register_with_alias_id() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org 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 > Signed-off-by: Isaku Yamahata > --- > 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;