From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Markus Armbruster <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: Dmitry Fleytman <dmitry@daynix.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Marcel Apfelbaum <marcel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 15/17] vmw_pvscsi: remove unnecessary internal msi state flag
Date: Tue, 14 Jun 2016 17:31:11 +0800 [thread overview]
Message-ID: <575FCEDF.9010104@cn.fujitsu.com> (raw)
In-Reply-To: <87a8iombnh.fsf@dusky.pond.sub.org>
On 06/14/2016 04:12 PM, Markus Armbruster wrote:
> "Michael S. Tsirkin" <mst@redhat.com> 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
next prev parent reply other threads:[~2016-06-14 9:25 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-10 9:54 [Qemu-devel] [PATCH v8 00/17] Add param Error ** for msi_init() Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 01/17] pci core: assert ENOSPC when add capability Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 02/17] fix some coding style problems Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 03/17] change pvscsi_init_msi() type to void Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 04/17] megasas: Fix check for msi_init() failure Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 05/17] mptsas: change .realize function name Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 06/17] usb xhci: change msi/msix property type Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 07/17] intel-hda: change msi " Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 08/17] mptsas: " Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 09/17] megasas: change msi/msix " Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 10/17] pci bridge dev: change msi " Cao jin
2016-06-13 9:35 ` Marcel Apfelbaum
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 11/17] msi_init: change return value to 0 on success Cao jin
2016-06-13 9:38 ` Marcel Apfelbaum
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it Cao jin
2016-06-13 10:16 ` Marcel Apfelbaum
2016-06-13 11:07 ` Markus Armbruster
2016-06-13 11:53 ` Marcel Apfelbaum
2016-06-13 11:09 ` Cao jin
2016-06-13 11:55 ` Marcel Apfelbaum
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 13/17] megasas: remove unnecessary megasas_use_msi() Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 14/17] mptsas: remove unnecessary internal msi state flag Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 15/17] vmw_pvscsi: " Cao jin
2016-06-13 19:42 ` Michael S. Tsirkin
2016-06-14 8:12 ` Markus Armbruster
2016-06-14 9:31 ` Cao jin [this message]
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 16/17] vmxnet3: " Cao jin
2016-06-13 8:47 ` Markus Armbruster
2016-06-13 9:31 ` Cao jin
2016-06-10 9:54 ` [Qemu-devel] [PATCH v8 17/17] e1000e: " Cao jin
2016-06-13 8:48 ` [Qemu-devel] [PATCH v8 00/17] Add param Error ** for msi_init() Markus Armbruster
2016-06-13 9:15 ` Cao jin
2016-06-13 19:45 ` Michael S. Tsirkin
2016-06-13 20:31 ` Michael S. Tsirkin
2016-06-14 9:35 ` Cao jin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=575FCEDF.9010104@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=armbru@redhat.com \
--cc=dmitry@daynix.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).