Received: by 10.213.65.68 with SMTP id h4csp3979276imn; Tue, 10 Apr 2018 07:30:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx486FP43lIk7NwObDkT5eOkWwMJD8dogW1uCUsFfLDTaouZI6KLG1MKdB3PnCd/pJi687RO0 X-Received: by 10.98.21.209 with SMTP id 200mr572199pfv.232.1523370617315; Tue, 10 Apr 2018 07:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523370617; cv=none; d=google.com; s=arc-20160816; b=wA3EHKrZf3hrPfwM/2W2mx8wed4Q3IQd1S1FqgqiF6RtS4aZGqE1UHpgmGoctTZArI M7h3h1ZhQ+HkBJMWhZdYxZosbqI+EcttgOEPt/ugqtRTxzSdfJx4aeiRgFealaGduyht 7WGOGwBuH25uaIy3dV0uTTDnph042c+iJHFDXvGhTNz93ibogzppEtmtfF8jeB1Hk3HN SRN9EmpFLtB2uymzJ6vBN2rQg4VHEBF7aUyWo9+wqUIZLVSNcMn5Vp2+Jo8UkIN1QlFG 7WA2yRWasTgg9KkjJNqAZEHSWGeMsPycRrOyMD/OnBbYNBmHxbFxQtbV3IE/mnUpa8vx qccQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=7/JfbNgHEkbkvSJhJ7I7dCtw00AC/OIUBvoEUBr1Dxk=; b=zEAfLEBehBsJu4kfXXooJU6JNgA2I8ryomc3xc1TTkdOL26OcXT098zP/rRvfw+wBQ TWNWnrMwYPLR0xxgllWcRlhrQnlVgi1KzlqcvYTcp8bVZ8JzFWMpzAlAbXCpQCpfC0qg +lH9cKS/E78W6r2gdcYtnjykKiPYikmgitM+AWNa2M7AI4xAKhjU2qULIjqJuUP3SVjJ ziXNIIM+6CFi29V/ngKdrJXoe8w/RFWUDmoh4/HE1mj8CkXLkd9D1lAYu29RlbrGHbH7 s5DvoOlWL2CKNJ1jSfVDaQRwuh5UiAHd+hfkiQCLx3dfCPNmUCzIEpZwCiqLmyBXO/58 KBWw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w71si1745846pgd.435.2018.04.10.07.29.40; Tue, 10 Apr 2018 07:30:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754111AbeDJOYC convert rfc822-to-8bit (ORCPT + 99 others); Tue, 10 Apr 2018 10:24:02 -0400 Received: from mga07.intel.com ([134.134.136.100]:9088 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753884AbeDJOX7 (ORCPT ); Tue, 10 Apr 2018 10:23:59 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 07:23:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,432,1517904000"; d="scan'208";a="219254898" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 10 Apr 2018 07:23:55 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Apr 2018 07:23:55 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Apr 2018 07:23:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.149]) with mapi id 14.03.0319.002; Tue, 10 Apr 2018 22:23:52 +0800 From: "Liang, Cunming" To: "Michael S. Tsirkin" CC: Paolo Bonzini , "Bie, Tiwei" , Jason Wang , "alex.williamson@redhat.com" , "ddutile@redhat.com" , "Duyck, Alexander H" , "virtio-dev@lists.oasis-open.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "Daly, Dan" , "Wang, Zhihong" , "Tan, Jianfeng" , "Wang, Xiao W" Subject: RE: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend Thread-Topic: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend Thread-Index: AQHT0HcQQbFx4V+vkUC8YiB5aZTOcaP46ciAgAAwtoCAAJIZYP//zjiAgACHCdA= Date: Tue, 10 Apr 2018 14:23:52 +0000 Message-ID: References: <20180402152330.4158-1-tiwei.bie@intel.com> <622f4bd7-1249-5545-dc5a-5a92b64f5c26@redhat.com> <20180410045723.rftsb7l4l3ip2ioi@debian> <7ee31a12-a370-fc43-82a6-2235f598e970@redhat.com> <20180410163105-mutt-send-email-mst@kernel.org> In-Reply-To: <20180410163105-mutt-send-email-mst@kernel.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTQ5OWYwMWUtMDUzMy00NDc2LTlhNDktMTIwZWVhYzZkMTBlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxIZ0JtUExaK282RG5tYmsrN3d4MDE2NVVOeVpwY3hNOXRZTFZYUVo0ZGM9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Michael S. Tsirkin [mailto:mst@redhat.com] > Sent: Tuesday, April 10, 2018 9:36 PM > To: Liang, Cunming > Cc: Paolo Bonzini ; Bie, Tiwei ; > Jason Wang ; alex.williamson@redhat.com; > ddutile@redhat.com; Duyck, Alexander H ; > virtio-dev@lists.oasis-open.org; linux-kernel@vger.kernel.org; > kvm@vger.kernel.org; virtualization@lists.linux-foundation.org; > netdev@vger.kernel.org; Daly, Dan ; Wang, Zhihong > ; Tan, Jianfeng ; Wang, Xiao > W > Subject: Re: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost > backend > > On Tue, Apr 10, 2018 at 09:23:53AM +0000, Liang, Cunming wrote: > > > > > > > -----Original Message----- > > > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > > > Sent: Tuesday, April 10, 2018 3:52 PM > > > To: Bie, Tiwei ; Jason Wang > > > > > > Cc: mst@redhat.com; alex.williamson@redhat.com; ddutile@redhat.com; > > > Duyck, Alexander H ; > > > virtio-dev@lists.oasis- open.org; linux-kernel@vger.kernel.org; > > > kvm@vger.kernel.org; virtualization@lists.linux-foundation.org; > > > netdev@vger.kernel.org; Daly, Dan ; Liang, > > > Cunming ; Wang, Zhihong > > > ; Tan, Jianfeng ; > > > Wang, Xiao W > > > Subject: Re: [virtio-dev] Re: [RFC] vhost: introduce mdev based > > > hardware vhost backend > > > > > > On 10/04/2018 06:57, Tiwei Bie wrote: > > > >> So you just move the abstraction layer from qemu to kernel, and > > > >> you still need different drivers in kernel for different device > > > >> interfaces of accelerators. This looks even more complex than > > > >> leaving it in qemu. As you said, another idea is to implement > > > >> userspace vhost backend for accelerators which seems easier and > > > >> could co-work with other parts of qemu without inventing new type of > messages. > > > > > > > > I'm not quite sure. Do you think it's acceptable to add various > > > > vendor specific hardware drivers in QEMU? > > > > > > I think so. We have vendor-specific quirks, and at some point there > > > was an idea of using quirks to implement (vendor-specific) live > > > migration support for assigned devices. > > > > Vendor-specific quirks of accessing VGA is a small portion. Other major portions > are still handled by guest driver. > > > > While in this case, when saying various vendor specific drivers in QEMU, it says > QEMU takes over and provides the entire user space device drivers. Some parts > are even not relevant to vhost, they're basic device function enabling. Moreover, > it could be different kinds of devices(network/block/...) under vhost. No matter > # of vendors or # of types, total LOC is not small. > > > > The idea is to avoid introducing these extra complexity out of QEMU, keeping > vhost adapter simple. As vhost protocol is de factor standard, it leverages kernel > device driver to provide the diversity. Changing once in QEMU, then it supports > multi-vendor devices whose drivers naturally providing kernel driver there. > > > > If QEMU is going to build a user space driver framework there, we're open mind > on that, even leveraging DPDK as the underlay library. Looking forward to more > others' comments from community. > > > > Steve > > Dependency on a kernel driver is fine IMHO. It's the dependency on a DPDK > backend that makes people unhappy, since the functionality in question is setup- > time only. Agreed, we don't see dependency on kernel driver is a problem. mdev based vhost backend (this patch set) is independent with vhost-user extension patch set. In fact, there're a few vhost-user providers, DPDK librte_vhost is one of them. FD.IO/VPP and snabbswitch have their own vhost-user providers. So I can't agree on vhost-user extension patch depends on DPDK backend. But anyway, that's the topic of another mail thread. > > As others said, we do not need to go overeboard. A couple of small vendor- > specific quirks in qemu isn't a big deal. It's quite challenge to identify it's small or not, there's no uniform metric. It's only dependent on QEMU itself, that's the obvious benefit. Tradeoff is to build the entire device driver. We don't object to do that in QEMU, but wanna make sure to understand the boundary size clearly. > > > > > > > Paolo