Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1674901rwr; Thu, 20 Apr 2023 20:12:15 -0700 (PDT) X-Google-Smtp-Source: AKy350aaKYbXWgxCBXz28wXrymYCHXhrOJjtkK/I5Ji0XHEoBaNaEIOXxHVlhHWH3WQF3/PayWNS X-Received: by 2002:a05:6a20:1b07:b0:f1:377a:b762 with SMTP id ch7-20020a056a201b0700b000f1377ab762mr3750859pzb.33.1682046735153; Thu, 20 Apr 2023 20:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682046735; cv=none; d=google.com; s=arc-20160816; b=l//cmWso/28wFu+2uylrtFQNW8oZjogxz1dcxq17fr3eaeiX6RmsB9H48kjJXyIZAd G5oPm5YgGY7VTL1WjCATG1To8KvkeVHa85FPLQ60TM165Hz+YxsjrvckEBm9+QKblfYk 1WrjFb9L1i2yoft2SvZiWhpFDjRGWQ79AjQYEABar6BAPzF2VsJ/95/xdOvovV6A63jL Vt1H1xCC8zoJV3sGsYJXA7j9LmOs47QJie8bicp6HPV2L3BKD+0kXlriFwKmtR1GVexm 2VsjSuS3REqwuVk6qqZgqqoVLnpgAdxZ4GvLJji963j9otzYbc8+dURqn/jJ/2t6+YsG RD+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=+0BBKwV0fgODqGkBmeM9w4CUQxEvIzqY5UmJZBudvIc=; b=WWBKODa98banaqX1m1BlhAN3Ip9pURG0SehxVI9rli1lk6xciQ81qZwSXnoHBDMjDC Wum8r35xKQuWM2slcF8RVfMw/+kEULPowT2uyvDA11xfVRklxi0STrrPUE7NKkZKSwqz 9SG4leK0/OJXvjQpFOUzF8sConHw8fmCPVLkPPow/byEYe/kpdThbSzCfWGFkawcb3yq acg42BhA9loK6upEt72kC6XuQj9gyA2NEx/cQ50b4nlYl8zXsAuUUUnKRvvOoQgtdvOa PoJPzTdfhDlEJtgI06COvO0Bw3m0s/ncJhNj/Nyhq8dPtrqQUUXsU0r/pXbgcOtDzvxe ZDXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a628401000000b005a8c65d57a0si3244826pfd.257.2023.04.20.20.12.03; Thu, 20 Apr 2023 20:12:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232333AbjDUDIC (ORCPT + 99 others); Thu, 20 Apr 2023 23:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233006AbjDUDH6 (ORCPT ); Thu, 20 Apr 2023 23:07:58 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2DB72712 for ; Thu, 20 Apr 2023 20:07:56 -0700 (PDT) Received: from kwepemm600005.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Q2fWF1JZBz17Th9; Fri, 21 Apr 2023 11:04:09 +0800 (CST) Received: from [10.67.103.158] (10.67.103.158) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 21 Apr 2023 11:07:54 +0800 Subject: Re: [PATCH v10 5/5] vfio: update live migration device status To: Jason Gunthorpe CC: , , , , , References: <20230408074224.62608-1-liulongfang@huawei.com> <20230408074224.62608-6-liulongfang@huawei.com> From: liulongfang Message-ID: Date: Fri, 21 Apr 2023 11:07:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.158] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/4/14 20:25, Jason Gunthorpe write: > On Sat, Apr 08, 2023 at 03:42:24PM +0800, Longfang Liu wrote: >> migration debugfs needs to perform debug operations based on the >> status of the current device. If the device is not loaded or has >> stopped, debugfs does not allow operations. >> >> so, after the live migration function is executed and the device is >> turned off, the device no longer needs to be accessed. At this time, >> the status of the device needs to be set to stop. > > STOP means the devices isn't functioning > > An idle device that has just been reset is RUNNING by definiton. > After the vfio device is opened, it will be set to RUNNING, and after it is closed, it should be set to STOP according to the function of the device. Or redefine an IDLE state? Thanks, Longfang. > Jason > . >