Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp8921ybk; Fri, 8 May 2020 16:54:45 -0700 (PDT) X-Google-Smtp-Source: APiQypK7cTLCJUcwN6pcfQq+lvPMNXkV9qXjQSCgv1sESdnx/wR0+9ovQMKNUGqA8ASv+QScabho X-Received: by 2002:a17:906:3607:: with SMTP id q7mr3922330ejb.313.1588982085016; Fri, 08 May 2020 16:54:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588982085; cv=none; d=google.com; s=arc-20160816; b=Daw07Gsy7KmYZpyyeJ3dsE9xZAG+zWbF/SzAZB0jcRl/S8f4K7cyO3j+lnCw0sPCEj yfquPYyeWOaT5ojdY8ZrPb40uitCicShXWTAyLkG0Isk8AQB7eTka4x/XTOGpL/3EeKr vcn2V/zPPg92voM2CpgIkXt+xkNvtkEjGNUOd/sAj7FLma3MogJu5I/f1fVRZOOmWkOy 9lYgeAyVHNBWa4H4ML6jxoSgNW1XdJh/ce5iOP22NCcdSLIIBwHL4AXyGOMqd+ozmVwM dr/MwZ/TzCjk9N/76rAf4nhqZGB8npHyKmUe7xDX1GNQUGbI/xmH+kG0QWig+9051BwD bH1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=8/I6A4O7C8c/8Oamn3WS9iLG+TE6xih0lmsVJkouvbk=; b=V0u0c8fPld9q8KTxIIgzxv7FSqLKehzuwk+IYjPOq5R5pjpRjzbDBCrNsheVM4KrUH t9wKMVWrtWLkMt2Z6ZN5BDsKbeCjF774bDlAoDGYWX7QYoWVDBvtW9sp/UkSVwUjzLsi AL/zYrUxEVJBoalHfqYc2eErHoWlF9RdNQgXiUzdYIOdaBoz1pcxUnEvuEOJrMXIoeSp Dj2LPQangH1O2h3CL5qw5KHrP0Sh5Cgbfm7ere1uJj6kTpiF84vB8BENzRreGzJ6UYZt +6kuDft/bR/SlWQCZBXbQ3o8hgpKAXcjjpIxZFoos71BRWi06TytQLSINP+QIRmIiIGi g5Tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si1875435ejc.451.2020.05.08.16.54.22; Fri, 08 May 2020 16:54:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728311AbgEHXxB (ORCPT + 99 others); Fri, 8 May 2020 19:53:01 -0400 Received: from mga04.intel.com ([192.55.52.120]:64968 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727778AbgEHXxA (ORCPT ); Fri, 8 May 2020 19:53:00 -0400 IronPort-SDR: 7W/WTduQHh4K85ty3T1PLNfWOgf2BLuBED5nvJdgQNBYKcBO9G8s6i+NsBhOZfMxRTm9vquzR0 SAhNCqSfhiwA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 16:53:00 -0700 IronPort-SDR: 5FbVbZSaevR+FLoYoAPBrA3ZoAmxaPh6wXWd08J2J9xWoH8Ncth6EK5vtLiKzZ6SJmrFoCzEkv NaihJWadQAzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,369,1583222400"; d="scan'208";a="296299524" Received: from djiang5-mobl1.amr.corp.intel.com (HELO [10.209.47.49]) ([10.209.47.49]) by fmsmga002.fm.intel.com with ESMTP; 08 May 2020 16:52:58 -0700 Subject: Re: [PATCH RFC 00/15] Add VFIO mediated device support and IMS support for the idxd driver. To: Jason Gunthorpe , "Raj, Ashok" Cc: "Tian, Kevin" , Alex Williamson , "vkoul@kernel.org" , "megha.dey@linux.intel.com" , "maz@kernel.org" , "bhelgaas@google.com" , "rafael@kernel.org" , "gregkh@linuxfoundation.org" , "tglx@linutronix.de" , "hpa@zytor.com" , "Pan, Jacob jun" , "Liu, Yi L" , "Lu, Baolu" , "Kumar, Sanjay K" , "Luck, Tony" , "Lin, Jing" , "Williams, Dan J" , "kwankhede@nvidia.com" , "eric.auger@redhat.com" , "parav@mellanox.com" , "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-pci@vger.kernel.org" , "kvm@vger.kernel.org" References: <20200424181203.GU13640@mellanox.com> <20200426191357.GB13640@mellanox.com> <20200426214355.29e19d33@x1.home> <20200427115818.GE13640@mellanox.com> <20200427071939.06aa300e@x1.home> <20200427132218.GG13640@mellanox.com> <20200508204710.GA78778@otc-nc-03> <20200508231610.GO19158@mellanox.com> From: Dave Jiang Message-ID: <57296ad1-20fe-caf2-b83f-46d823ca0b5f@intel.com> Date: Fri, 8 May 2020 16:52:57 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200508231610.GO19158@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/8/2020 4:16 PM, Jason Gunthorpe wrote: > On Fri, May 08, 2020 at 01:47:10PM -0700, Raj, Ashok wrote: > >> Even when uaccel was under development, one of the options >> was to use VFIO as the transport, goal was the same i.e to keep >> the user space have one interface. > > I feel a bit out of the loop here, uaccel isn't in today's kernel is > it? I've heard about it for a while, it sounds very similar to RDMA, > so I hope they took some of my advice... It went into 5.7 kernel. drivers/misc/uacce. It looks char device exported with SVM support. > >> But the needs of generic user space application is significantly >> different from exporting a more functional device model to guest, >> which isn't full emulated device. which is why VFIO didn't make >> sense for native use. > > I'm not sure this is true. We've done these kinds of emulated SIOV > like things already and there is a huge overlap between what a generic > user application needs and what the VMM neds. Actually almost a > perfect subset except for interrupt remapping (which is quite > trivial). > > The things vfio focuses on, like groups and managing a real config > space just don't apply here. > >> And when we move things from VFIO which is already established >> as a general device model and accepted by multiple VMM's it gives >> instant footing without a whole redesign. > > Yes, I understand, but I think you need to get more people to support > this idea. From my standpoint this is taking secure lean VMMs and > putting emulation code back into them, except in a more dangerous > kernel location. This does not seem like a net win to me. > > You'd be much better to have some userspace library scheme instead of > being completely tied to a kernel interface for modularity. > >> When we move things from VFIO to uaccel to bolt on the functionality >> like VFIO, I suspect we would be moving code/functionality from VFIO >> to Uaccel. I don't know what the net gain would be. > > Most of VFIO functionality is already decomposed inside the kernel, > and you need most of it to do secure user access anyhow. > >> For mdev, would you agree we can keep the current architecture, >> and investigate moving some emulation code to user space (say even for >> standard vfio_pci) and then expand scope later. > > I won't hard NAK this, but I think you need more people to support > this general idea of more emulation code in the kernel to go ahead - > particularly since this is one of many future drivers along this > design. > > It would be good to hear from the VMM teams that this is what they > want (and why), for instance. > > Jason >