Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp566951img; Fri, 22 Mar 2019 04:10:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwI9H9WUjCSS269pEB2SJWxB0/gm4FWyPRrszRzcpIKRHaFyaKRWyDh+a5SgG3w+Xdtq9Go X-Received: by 2002:aa7:83ca:: with SMTP id j10mr8540300pfn.50.1553253027180; Fri, 22 Mar 2019 04:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253027; cv=none; d=google.com; s=arc-20160816; b=GX2x49SLrNWSq6Ns6qam2PsvvgETQjUqzHyoc8yWfaCd5u2uK7yaFn2n/x8RUNq5w9 T1JpnUh4RqBVciHk3bt8luJEFjH2F+C7CrHVEmmzYKykBFLQcFhA2kBLnwnQUxODs2dW A6bIRhePkU7nVOO+Y3qiUCZ8UwLwFqn/UnhKptNbWG2SaQM9MXjFwA4RyhA012cdpIm4 lLkyU/MADWUgEyvoVy2tHgprCYN1QyOE5m/V4w27IXAdR1DdLJGDhG9Z2Cdp8EDDKwgY j7dwxPiadyT5cKPDYTlBUsJQxLvkl9JqCN2/oL5wJMQ7XTOf7JLoJGG4MHIROVGYCwLI Dw0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Eg78DCTu8GLZTzLmHUotjjOZKd0IHC9v3Rv5FsiM3kk=; b=FWRrROTwVYoNsSnJRj1MAf36S/uvh93iqA0IPYKVUDw59Tb9h+UD1n1X5M/Uykt7rk VLO8FHg4utwEk+XLmPa8bFCXvwraXnMHBiFFNqB+jawh9Muqc9qHpkGPsmTlF27FK7Jr i6+nEq5savTekZU8SnxVzR3s23NAhu2BEfHRRpJGj/qysnUYWlNeOgRpr2D0YyMtSMMc vU97SQynjfgbEhOIru01hIm7eNNWuu6JKLM3hx4bK2FcsNwKiprXDjHbZ+xO51i4kcHx cPW7SQ8YzvxE9djFOom4ROIniJhJo1pv3gSaobAL+X8gZ9pnlULvRoLSi+1S6UliJzd6 /PYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qocdnVak; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h127si6709102pfb.213.2019.03.22.04.10.11; Fri, 22 Mar 2019 04:10:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qocdnVak; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728096AbfCVLJ0 (ORCPT + 99 others); Fri, 22 Mar 2019 07:09:26 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34968 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbfCVLJ0 (ORCPT ); Fri, 22 Mar 2019 07:09:26 -0400 Received: by mail-lj1-f194.google.com with SMTP id t13so1689907lji.2; Fri, 22 Mar 2019 04:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Eg78DCTu8GLZTzLmHUotjjOZKd0IHC9v3Rv5FsiM3kk=; b=qocdnVakNIvremL+J8pHBn2k21UU0LKbQjnaZJQwLqagyoADtoENpVW+CUOhNyQY6f cZpyDESrxHPsVh5sWGUO1F4/4b/aYDJ3/N4S4/5bwGIKlatmq4tsluklH1ezatuwXYm9 8P3pFTbK4kl109xW6PT5XVPIWj1Vkmnxmrvrn0U+r4FaB6tcsEd0QoXa1n9KW8lUJ/Rz lni1bm/0ApNY+1rkmh1lvtaFWeGz1HIdeeYgVsHmaHxvMcXO8HO2VBu75/1sA7Xp2X3f 1Q92SwqALY09qZuogBOxG+atPFzZxjfslhw8k0E+l3o+Ib8K9Sf6TJzARjRoixLDXKn1 wnPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Eg78DCTu8GLZTzLmHUotjjOZKd0IHC9v3Rv5FsiM3kk=; b=nXp+EmJbhw7vk7LS4+gQI0jieLBcXv8MbD5prJwMl4Em3bW7t1ZuyIg3cWKpC82xh0 v/fZ3kKf3U0JCAi1UNg/F4W5/zlKyft8qZvNZaHlEwxHaA15c99zqvOZm62yqGxGsV// JeHc5NpbtndUle5G+9N4hm6joLgZ8esHfXxjkKs6Ilx1BhJ8LxYi5u5u+WxaKYNHhUW2 PSrnqXhGnHuzm8Po0tQmlOvtvN7Jextsm+DUT1jethYv44x/YopGZcQy5//oZvcAxvY0 LcLSLoSZtslfz2e0nkuOiV5+Iz6SrH7ZN4xLVaJGpszpfx7vsBDPZ9rjgQOVXYwLPO28 Ka7A== X-Gm-Message-State: APjAAAWuNPqRaL24G6iCgFORyNzN92BIE/ZqQTJ46d0nas0kr/H2Gldr y54SeqxBOIzWYxRo61Eh4Og= X-Received: by 2002:a2e:97cc:: with SMTP id m12mr4943781ljj.181.1553252964189; Fri, 22 Mar 2019 04:09:24 -0700 (PDT) Received: from [10.17.182.20] (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id j2sm1581215lfm.56.2019.03.22.04.09.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Mar 2019 04:09:23 -0700 (PDT) Subject: Re: [Xen-devel][PATCH] Input: xen-kbdfront - signal the backend that we disconnect To: Juergen Gross , 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 References: <20190315092348.32613-1-andr2000@gmail.com> <32add426-ae36-ecc9-aa3e-6169fe04f231@suse.com> From: Oleksandr Andrushchenko Message-ID: <9b814fc6-d130-ec63-65a1-fbfd957de52b@gmail.com> Date: Fri, 22 Mar 2019 13:09:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <32add426-ae36-ecc9-aa3e-6169fe04f231@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/22/19 1:03 PM, Juergen Gross wrote: > On 15/03/2019 10:23, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> 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 >> --- >> 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