Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7048877rwb; Mon, 5 Dec 2022 23:51:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf5J6kl5wbpZHajxLzjHiOxHOMCWPyBuz/veHahtdcotljZyEaf8/fiLkIP+eYRoqC3fYSWp X-Received: by 2002:a63:c48:0:b0:470:1186:de85 with SMTP id 8-20020a630c48000000b004701186de85mr63184808pgm.609.1670313089112; Mon, 05 Dec 2022 23:51:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670313089; cv=none; d=google.com; s=arc-20160816; b=OjYReC9JmIZUcPjXN3CpNIklQdzio4CSxaMV/axgclQZ2CIFSJ6H0fbTQAwkp/VnjU qEAs1V5M8jnWOnmr4vwGy5ZXv6by3Bult7+oZ+zq+3s6HPkOXoqZsVHl/1pM2sEZimYd HqBwMV6P0xRO0ZCt6abkVz8jinoHYtJAWlznw/eL1MFdI5Jfc8KI0kRD82mMLLzzXUmN CuScKGD+QmNi8p1IF+olqTBe9iOVBcPhIgE/5RT0bMqSTMMnbqZzEpUnjB/0wp/VJ0cI d4VYF14fM/RkDern+VrMgy+TiqRJ6tDewie8TfdIqb9HaTPnq7S420KSyfvyIN5hHrAH JULg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dOyeCXTp1/UlAgaqjmoJMi6dt0KkYtBLDZN51Jaqp/c=; b=U82IDkxHXgZcUMuwK3BQ5WoLSfYPELR5xv2+WawDZhc2vIBWvhNhSNqz0WA1GOydGl FpIAWbORoj4Nmxk+HPAslxR8AvE6hIGkri8EriVjiFk9F1K81W4iLIjmi81DK+u2BUq+ w/5SRoHVKT1mZJoabzR9xqn2XLGnCpMiEb56Z6tRE0eKR4FHI67wYBU45thLLr8UBg0B dpWu1rWqJPvkAHyMFr16yja0Ri/yMvQllokCGHjo/4knoBbRHm8clp7UKmqjGX2nxBD9 gqx83bR/N2HThSIr69etDp5Zsk4vJmUTrYWy5VoWjQ9qDPlObJPIGjPMzyN+9f+nkC4q w9jQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a63474a000000b004776762655fsi16808079pgk.606.2022.12.05.23.51.18; Mon, 05 Dec 2022 23:51:29 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233419AbiLFG0O (ORCPT + 79 others); Tue, 6 Dec 2022 01:26:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiLFG0K (ORCPT ); Tue, 6 Dec 2022 01:26:10 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52AAC275D2; Mon, 5 Dec 2022 22:26:09 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id AC88E68B05; Tue, 6 Dec 2022 07:26:04 +0100 (CET) Date: Tue, 6 Dec 2022 07:26:04 +0100 From: Christoph Hellwig To: Lei Rao Cc: kbusch@kernel.org, axboe@fb.com, kch@nvidia.com, hch@lst.de, sagi@grimberg.me, alex.williamson@redhat.com, cohuck@redhat.com, jgg@ziepe.ca, yishaih@nvidia.com, shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com, mjrosato@linux.ibm.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, kvm@vger.kernel.org, eddie.dong@intel.com, yadong.li@intel.com, yi.l.liu@intel.com, Konrad.wilk@oracle.com, stephen@eideticom.com, hang.yuan@intel.com Subject: Re: [RFC PATCH 5/5] nvme-vfio: Add a document for the NVMe device Message-ID: <20221206062604.GB6595@lst.de> References: <20221206055816.292304-1-lei.rao@intel.com> <20221206055816.292304-6-lei.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221206055816.292304-6-lei.rao@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Tue, Dec 06, 2022 at 01:58:16PM +0800, Lei Rao wrote: > The documentation describes the details of the NVMe hardware > extension to support VFIO live migration. This is not a NVMe hardware extension, this is some really strange and half-assed intel-specific extension to nvme, which like any other vendors specific non-standard extensions to nvme we refused to support in Linux. There is a TPAR for live migration building blocks under discussion in the NVMe technical working group. It will still require mediatation of access to the admin queue to deal with the huge amout of state nvme has that needs to be migrated (and which doesn't seem to be covered at all here). In Linux the equivalent would be to implement a mdev driver that allows passing through the I/O qeues to a guest, but it might be a better idea to handle the device model emulation entirely in Qemu (or other userspace device models) and just find a way to expose enough of the I/O queues to userspace. The current TPAR seems to be very complicated for that, as in many cases we'd only need a way to tіe certain namespaces to certain I/O queues and not waste a lot of resources on the rest of the controller.