All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Shenming Lu <lushenming@huawei.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Neo Jia <cjia@nvidia.com>,
	mst@redhat.com, qemu-devel@nongnu.org,
	Marc Zyngier <maz@kernel.org>,
	Kirti Wankhede <kwankhede@nvidia.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Eric Auger <eric.auger@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-arm@nongnu.org,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	yuzenghui@huawei.com, wanghaibin.wang@huawei.com
Subject: Re: [RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in VFIO migration
Date: Wed, 9 Dec 2020 13:29:47 +0100	[thread overview]
Message-ID: <20201209132947.3177f130.cohuck@redhat.com> (raw)
In-Reply-To: <20201209080919.156-2-lushenming@huawei.com>

On Wed, 9 Dec 2020 16:09:17 +0800
Shenming Lu <lushenming@huawei.com> wrote:

> On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt
> setup, if the restoring of the VFIO PCI device config space is
> before the VGIC, an error might occur in the kernel.
> 
> So we move the saving of the config space to the non-iterable
> process, so that it will be called after the VGIC according to
> their priorities.
> 
> As for the possible dependence of the device specific migration
> data on it's config space, we can let the vendor driver to
> include any config info it needs in its own data stream.
> (Should we note this in the header file linux-headers/linux/vfio.h?)

Given that the header is our primary source about how this interface
should act, we need to properly document expectations about what will
be saved/restored when there (well, in the source file in the kernel.)
That goes in both directions: what a userspace must implement, and what
a vendor driver can rely on.

[Related, but not a todo for you: I think we're still missing proper
documentation of the whole migration feature.]

> 
> Signed-off-by: Shenming Lu <lushenming@huawei.com>
> ---
>  hw/vfio/migration.c | 25 +++++++++++++++----------
>  1 file changed, 15 insertions(+), 10 deletions(-)


WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cohuck@redhat.com>
To: Shenming Lu <lushenming@huawei.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Neo Jia <cjia@nvidia.com>,
	mst@redhat.com, qemu-devel@nongnu.org,
	Marc Zyngier <maz@kernel.org>,
	Kirti Wankhede <kwankhede@nvidia.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Eric Auger <eric.auger@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-arm@nongnu.org, yuzenghui@huawei.com,
	wanghaibin.wang@huawei.com
Subject: Re: [RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in VFIO migration
Date: Wed, 9 Dec 2020 13:29:47 +0100	[thread overview]
Message-ID: <20201209132947.3177f130.cohuck@redhat.com> (raw)
In-Reply-To: <20201209080919.156-2-lushenming@huawei.com>

On Wed, 9 Dec 2020 16:09:17 +0800
Shenming Lu <lushenming@huawei.com> wrote:

> On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt
> setup, if the restoring of the VFIO PCI device config space is
> before the VGIC, an error might occur in the kernel.
> 
> So we move the saving of the config space to the non-iterable
> process, so that it will be called after the VGIC according to
> their priorities.
> 
> As for the possible dependence of the device specific migration
> data on it's config space, we can let the vendor driver to
> include any config info it needs in its own data stream.
> (Should we note this in the header file linux-headers/linux/vfio.h?)

Given that the header is our primary source about how this interface
should act, we need to properly document expectations about what will
be saved/restored when there (well, in the source file in the kernel.)
That goes in both directions: what a userspace must implement, and what
a vendor driver can rely on.

[Related, but not a todo for you: I think we're still missing proper
documentation of the whole migration feature.]

> 
> Signed-off-by: Shenming Lu <lushenming@huawei.com>
> ---
>  hw/vfio/migration.c | 25 +++++++++++++++----------
>  1 file changed, 15 insertions(+), 10 deletions(-)



  reply	other threads:[~2020-12-09 12:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  8:09 [RFC PATCH v2 0/3] vfio: Some fixes and optimizations for VFIO migration Shenming Lu
2020-12-09  8:09 ` [RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in " Shenming Lu
2020-12-09 12:29   ` Cornelia Huck [this message]
2020-12-09 12:29     ` Cornelia Huck
2020-12-09 18:34     ` Alex Williamson
2020-12-09 18:34       ` Alex Williamson
2020-12-10  2:21       ` Shenming Lu
2020-12-10  2:21         ` Shenming Lu
2021-01-26 21:36         ` Alex Williamson
2021-01-26 21:36           ` Alex Williamson
2021-01-27 21:52           ` Kirti Wankhede
2021-01-27 21:52             ` Kirti Wankhede
2021-02-18 14:45           ` Kirti Wankhede
2021-02-18 14:42   ` Kirti Wankhede
2021-02-19 10:33     ` Shenming Lu
2021-02-19 10:33       ` Shenming Lu
2020-12-09  8:09 ` [RFC PATCH v2 2/3] vfio: Set the priority of the VFIO VM state change handler explicitly Shenming Lu
2020-12-09 12:45   ` Cornelia Huck
2020-12-09 12:45     ` Cornelia Huck
2020-12-10  3:11     ` Shenming Lu
2020-12-10  3:11       ` Shenming Lu
2020-12-10 18:39       ` Cornelia Huck
2020-12-10 18:39         ` Cornelia Huck
2021-01-26 21:36   ` Alex Williamson
2021-01-26 21:36     ` Alex Williamson
2021-01-27 11:20     ` Shenming Lu
2021-01-27 11:20       ` Shenming Lu
2021-01-27 14:20       ` Alex Williamson
2021-01-27 14:20         ` Alex Williamson
2021-01-28  2:35         ` Shenming Lu
2021-01-28  2:35           ` Shenming Lu
2020-12-09  8:09 ` [RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration Shenming Lu
2021-01-26 21:36   ` Alex Williamson
2021-01-27 11:27     ` Shenming Lu
2021-01-27 11:27       ` Shenming Lu
2021-01-27 14:21       ` Alex Williamson
2021-01-27 14:21         ` Alex Williamson
2021-02-01  3:12         ` Shenming Lu
2021-02-01  3:12           ` Shenming Lu
2021-01-26  6:03 ` [RFC PATCH v2 0/3] vfio: Some fixes and optimizations for " Shenming Lu

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=20201209132947.3177f130.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=cjia@nvidia.com \
    --cc=dgilbert@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kwankhede@nvidia.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lushenming@huawei.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=maz@kernel.org \
    --cc=mst@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wanghaibin.wang@huawei.com \
    --cc=yuzenghui@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.