From: Pierre Morel <pmorel@linux.ibm.com>
To: Eric Farman <farman@linux.ibm.com>, pasic@linux.vnet.ibm.com
Cc: cohuck@redhat.com, alifm@linux.ibm.com,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH v3 2/6] vfio: ccw: Rework subchannel state on setup
Date: Wed, 19 Dec 2018 10:51:03 +0100 [thread overview]
Message-ID: <f75dd1ca-c975-6cdf-45bf-7a73a34082c0@linux.ibm.com> (raw)
In-Reply-To: <ccead686-3c35-9a4a-3d9e-b88fd7170205@linux.ibm.com>
On 18/12/2018 18:44, Eric Farman wrote:
> My questions to this patch from the original RFC series are still
> outstanding. :(
>
> https://marc.info/?l=linux-s390&m=154223063716128&w=2
Hi Eric,
Thanks for the following of this patch series.
For your question about quiece during remove I do not think it should be
a NOP, we must make sure the channel is disabled at that time.
>
> On 11/28/2018 07:41 AM, Pierre Morel wrote:
>> The subchannel enablement and the according setting to the
>> VFIO_CCW_STATE_STANDBY state should only be done when all
>> parts of the VFIO mediated device have been initialized
>> i.e. after the mediated device has been successfully opened.
>>
>> Let's stay in VFIO_CCW_STATE_NOT_OPER until the mediated
>> device has been opened and set the VFIO_CCW_STATE_STANDBY
>> on a successful open.
>>
>> On release the state is set back to VFIO_CCW_STATE_NOT_OPER
>> by vfio_ccw_sch_quiesce().
>>
>> When the mediated device is closed, disable the sub channel
>> by calling vfio_ccw_sch_quiesce().
>>
>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>> ---
>> drivers/s390/cio/vfio_ccw_async.c | 11 +++++++++++
>
> Ah, this series is built on Connie's async changes. Okay. [1]
Yes, and after reflections I think the timing is bad so I prefer to wait
for the series from Connie on hsch/csch to be finished before going on
with this series.
Otherwise I fear to only add noise to the current discussions.
>
>> drivers/s390/cio/vfio_ccw_drv.c | 10 +---------
>> drivers/s390/cio/vfio_ccw_ops.c | 27 +++++++++++++++++++++------
...snip...
>> @@ -170,6 +184,7 @@ static void vfio_ccw_mdev_release(struct
>> mdev_device *mdev)
>> dev_get_drvdata(mdev_parent_dev(mdev));
>> int i;
>> + vfio_ccw_sch_quiesce(private->sch);
>> vfio_unregister_notifier(mdev_dev(mdev), VFIO_IOMMU_NOTIFY,
>> &private->nb);
>
> [1] If Connie's async patches go in first, then the stuff in your
> "vfio_ccw_unregister_async_dev_regions" is also added here. That could
> be removed and replaced with a call to your new function, yes?
certainly.
Thanks for your comments.
Regards,
Pierre
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
next prev parent reply other threads:[~2018-12-19 9:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 12:41 [PATCH v3 0/6] vfio: ccw: VFIO CCW cleanup part1 Pierre Morel
2018-11-28 12:41 ` [PATCH v3 1/6] vfio: ccw: Register mediated device once all structures are initialized Pierre Morel
2018-11-28 12:41 ` [PATCH v3 2/6] vfio: ccw: Rework subchannel state on setup Pierre Morel
2018-12-18 17:44 ` Eric Farman
2018-12-19 9:51 ` Pierre Morel [this message]
2018-11-28 12:41 ` [PATCH v3 3/6] vfio: ccw: Rework subchannel state on removing Pierre Morel
2018-11-28 12:41 ` [PATCH v3 4/6] vfio: ccw: Rework subchannel state on sch_event Pierre Morel
2018-11-28 12:41 ` [PATCH v3 5/6] vfio: ccw: Documenting state transitions Pierre Morel
2018-11-28 12:41 ` [PATCH v3 6/6] vfio: ccw: serialize the write system calls Pierre Morel
2018-12-13 15:39 ` Cornelia Huck
2018-12-14 12:42 ` Halil Pasic
2018-12-14 14:08 ` Pierre Morel
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=f75dd1ca-c975-6cdf-45bf-7a73a34082c0@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=alifm@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=farman@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pasic@linux.vnet.ibm.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 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).