From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Juergen Gross <jgross@suse.com>,
xen-devel@lists.xenproject.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com,
boris.ostrovsky@oracle.com
Cc: Volodymyr_Babchuk@epam.com,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: Re: [Xen-devel][PATCH] Input: xen-kbdfront - signal the backend that we disconnect
Date: Fri, 22 Mar 2019 13:09:22 +0200 [thread overview]
Message-ID: <9b814fc6-d130-ec63-65a1-fbfd957de52b@gmail.com> (raw)
In-Reply-To: <32add426-ae36-ecc9-aa3e-6169fe04f231@suse.com>
On 3/22/19 1:03 PM, Juergen Gross wrote:
> On 15/03/2019 10:23, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> While disconnecting from the backend we clean up shared resources
>> (event channel, ring buffer), but never let the backend know about
>> that. This may lead to inconsistent backend state and/or shared
>> resources use.
>> Fix this by explicitly letting the backend know that frontend has
>> destroyed shared resources by changing its Xen bus state accordingly.
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> ---
>> drivers/input/misc/xen-kbdfront.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
>> index 24bc5c5d876f..ecb6e719e0e2 100644
>> --- a/drivers/input/misc/xen-kbdfront.c
>> +++ b/drivers/input/misc/xen-kbdfront.c
>> @@ -488,6 +488,8 @@ static int xenkbd_connect_backend(struct xenbus_device *dev,
>>
>> static void xenkbd_disconnect_backend(struct xenkbd_info *info)
>> {
>> + xenbus_switch_state(info->xbdev, XenbusStateClosing);
>> +
>> if (info->irq >= 0)
>> unbind_from_irqhandler(info->irq, info);
>> info->irq = -1;
>>
> As already stated for the related netfront patch: I'm not sure this
> is really what we want. Have you tested xl save/restore or migration
> of the guest with your patch applied?
Well, it comes out that this is not enough and needs much more work,
so please let's abandon this patch
>
> Juergen
Thank you,
Oleksandr
prev parent reply other threads:[~2019-03-22 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 9:23 [Xen-devel][PATCH] Input: xen-kbdfront - signal the backend that we disconnect Oleksandr Andrushchenko
2019-03-22 11:03 ` Juergen Gross
2019-03-22 11:09 ` Oleksandr Andrushchenko [this message]
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=9b814fc6-d130-ec63-65a1-fbfd957de52b@gmail.com \
--to=andr2000@gmail.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jgross@suse.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=xen-devel@lists.xenproject.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