From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8qVu-0005D9-CS for qemu-devel@nongnu.org; Mon, 21 Nov 2016 10:28:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8qVr-0003N6-90 for qemu-devel@nongnu.org; Mon, 21 Nov 2016 10:28:10 -0500 Received: from 6.mo53.mail-out.ovh.net ([46.105.58.122]:55772) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c8qVr-0003MX-1H for qemu-devel@nongnu.org; Mon, 21 Nov 2016 10:28:07 -0500 Received: from player158.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo53.mail-out.ovh.net (Postfix) with ESMTP id 9D7C043465 for ; Mon, 21 Nov 2016 16:28:05 +0100 (CET) Date: Mon, 21 Nov 2016 16:27:58 +0100 From: Greg Kurz Message-ID: <20161121162758.500c7cf2@bahia> In-Reply-To: <1479706302-2251-5-git-send-email-david@gibson.dropbear.id.au> References: <1479706302-2251-1-git-send-email-david@gibson.dropbear.id.au> <1479706302-2251-5-git-send-email-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCHv2 4/5] Revert "spapr: Fix migration of PCI host bridges from qemu-2.7" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: mdroth@linux.vnet.ibm.com, dgilbert@redhat.com, lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org On Mon, 21 Nov 2016 16:31:41 +1100 David Gibson wrote: > This reverts commit 9b54ca0ba781012eeea4237b7c4832ba2ea81d89. > > The commit above corrected a migration breakage between qemu-2.7 and > qemu-2.8. However it did so by advancing the migration version for > the PCI host bridge, which obviously breaks migration backwards to > earlier qemu versions. > > Although it's not totally essential, we'd like to maintain the > possibility for backwards migration, so revert the change in > preparation for a better fix. > > Signed-off-by: David Gibson > --- Reviewed-by: Greg Kurz > hw/ppc/spapr_pci.c | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) > > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 661f7d8..e429c94 100644 > --- a/hw/ppc/spapr_pci.c > +++ b/hw/ppc/spapr_pci.c > @@ -1680,25 +1680,19 @@ static int spapr_pci_post_load(void *opaque, int version_id) > return 0; > } > > -static bool version_before_3(void *opaque, int version_id) > -{ > - return version_id < 3; > -} > - > static const VMStateDescription vmstate_spapr_pci = { > .name = "spapr_pci", > - .version_id = 3, > + .version_id = 2, > .minimum_version_id = 2, > .pre_save = spapr_pci_pre_save, > .post_load = spapr_pci_post_load, > .fields = (VMStateField[]) { > VMSTATE_UINT64_EQUAL(buid, sPAPRPHBState), > - VMSTATE_UNUSED_TEST(version_before_3, > - sizeof(uint32_t) /* dma_liobn[0] */ > - + sizeof(uint64_t) /* mem_win_addr */ > - + sizeof(uint64_t) /* mem_win_size */ > - + sizeof(uint64_t) /* io_win_addr */ > - + sizeof(uint64_t) /* io_win_size */), > + VMSTATE_UINT32_EQUAL(dma_liobn[0], sPAPRPHBState), > + VMSTATE_UINT64_EQUAL(mem_win_addr, sPAPRPHBState), > + VMSTATE_UINT64_EQUAL(mem_win_size, sPAPRPHBState), > + VMSTATE_UINT64_EQUAL(io_win_addr, sPAPRPHBState), > + VMSTATE_UINT64_EQUAL(io_win_size, sPAPRPHBState), > VMSTATE_STRUCT_ARRAY(lsi_table, sPAPRPHBState, PCI_NUM_PINS, 0, > vmstate_spapr_pci_lsi, struct spapr_pci_lsi), > VMSTATE_INT32(msi_devs_num, sPAPRPHBState),