From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCkbW-0006Jw-Tt for qemu-devel@nongnu.org; Tue, 14 Jun 2016 05:25:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCkbS-0008Mk-L5 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 05:25:49 -0400 Received: from [59.151.112.132] (port=39457 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCkbS-0008KZ-0X for qemu-devel@nongnu.org; Tue, 14 Jun 2016 05:25:46 -0400 References: <1465552478-5540-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1465552478-5540-16-git-send-email-caoj.fnst@cn.fujitsu.com> <20160613224151-mutt-send-email-mst@redhat.com> <87a8iombnh.fsf@dusky.pond.sub.org> From: Cao jin Message-ID: <575FCEDF.9010104@cn.fujitsu.com> Date: Tue, 14 Jun 2016 17:31:11 +0800 MIME-Version: 1.0 In-Reply-To: <87a8iombnh.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v8 15/17] vmw_pvscsi: remove unnecessary internal msi state flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , "Michael S. Tsirkin" Cc: Dmitry Fleytman , Paolo Bonzini , qemu-devel@nongnu.org, Marcel Apfelbaum On 06/14/2016 04:12 PM, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > >>> @@ -1222,7 +1215,6 @@ static const VMStateDescription vmstate_pvscsi = { >>> VMSTATE_STRUCT_TEST(parent_obj, PVSCSIState, >>> pvscsi_vmstate_test_pci_device, 0, >>> vmstate_pci_device, PCIDevice), >>> - VMSTATE_UINT8(msi_used, PVSCSIState), >>> VMSTATE_UINT32(resetting, PVSCSIState), >>> VMSTATE_UINT64(reg_interrupt_status, PVSCSIState), >>> VMSTATE_UINT64(reg_interrupt_enabled, PVSCSIState), >> >> >> This change will break cross-version migration, we can't make it. > > Oww, sorry I missed this! > > The value shouldn't have been put into the migration stream, but now > it's there, we need to keep it there. Suggest: > Thanks, will collect these in next version. > > diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c > index ecd6077..edd91ec 100644 > --- a/hw/scsi/vmw_pvscsi.c > +++ b/hw/scsi/vmw_pvscsi.c > @@ -121,7 +121,7 @@ typedef struct { > uint8_t msg_ring_info_valid; /* Whether message ring initialized */ > uint8_t use_msg; /* Whether to use message ring */ > > - uint8_t msi_used; /* Whether MSI support was installed successfully */ > + uint8_t msi_used; /* For migration compatibility */ > > PVSCSIRingInfo rings; /* Data transfer rings manager */ > uint32_t resetting; /* Reset in progress */ > @@ -362,7 +362,7 @@ pvscsi_update_irq_status(PVSCSIState *s) > trace_pvscsi_update_irq_level(should_raise, s->reg_interrupt_enabled, > s->reg_interrupt_status); > > - if (s->msi_used && msi_enabled(d)) { > + if (msi_enabled(d)) { > if (should_raise) { > trace_pvscsi_update_irq_msi(); > msi_notify(d, PVSCSI_VECTOR_COMPLETION); > @@ -1077,9 +1077,7 @@ pvscsi_cleanup_msi(PVSCSIState *s) > { > PCIDevice *d = PCI_DEVICE(s); > > - if (s->msi_used) { > - msi_uninit(d); > - } > + msi_uninit(d); > } > > static const MemoryRegionOps pvscsi_ops = { > > > > . > -- Yours Sincerely, Cao jin