Received: by 10.213.65.68 with SMTP id h4csp3918552imn; Tue, 10 Apr 2018 06:40:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ZmsVVblPO7V0WEwKCjHHdyk2l0DqZNgheGUAHitdF4nbCJ1tjCBtLNGgPZr0u6EZtYlpL X-Received: by 10.101.64.129 with SMTP id t1mr334726pgp.173.1523367610595; Tue, 10 Apr 2018 06:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523367610; cv=none; d=google.com; s=arc-20160816; b=Yb1LyTVuXlMSvftdTqOjo14xeAExPsg2nQbEQ59fk9Vf39ofP+O5AVtI9SebyVx9Q6 KVz4DtinV+XSjQuW+qr64j5P2girnhQJxVaoJ8r7arn3EtiG1WqFrYJX6rGK5I98N5JU M1sZ9txr4DAnaXTQ85zz9SfCqAgh6HphHwxI0pRcC2yP8CUsnKV6DznEhWhS1Zffk6yS pFOi5pyWK6CsxMqQGVuJduEwXkOtpnHAk4uueNDDZSKOW2+yWz5F2XQ8Fi8QCjarMtdJ xIG8GenV/K32uHa4VqTwohkWAd6eoD+AGOTfAocekI3iS6T+vOk6Y3KWwKalYcyO8HkB QAhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=zsTarwp7hqg1qXAOw+Rq2fctHO+3KrQW9cEEPkm+QSQ=; b=Rvf9EZpxn61kKCV+aTZLsj2FqNULAsDkuGtQclnEv4K+YbhksHr8YQsPtuiciRqFAs 17P820yvaGXD/Hf095WFVcOJbaxzM/nU8C84BOQrV2ZbWzY52N2kRWe4UTF332SDGkkw DhyyTh424rhP5amVmrM2h91g4OKqYcePzoOPDKBP9MAxcaMqY7E/kF1LocGY0aAxI26V hzhaeUbyNXPTd+5spKIeOOW2zXLRAzO57acyBV5/XM6g8Ep6S2S8A/cYQF6lt6GJhFHC rsjzTL1JegG0AGm6TLMllWiXEhJ7L1EsaYMAX5jfON0gO3ebimWLaCJT1J3JZxXsM1Nk Ru3w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7-v6si2628214plk.397.2018.04.10.06.39.33; Tue, 10 Apr 2018 06:40:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753114AbeDJNgd (ORCPT + 99 others); Tue, 10 Apr 2018 09:36:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43830 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752622AbeDJNgb (ORCPT ); Tue, 10 Apr 2018 09:36:31 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CDDD67C3B1; Tue, 10 Apr 2018 13:36:30 +0000 (UTC) Received: from redhat.com (ovpn-123-231.rdu2.redhat.com [10.10.123.231]) by smtp.corp.redhat.com (Postfix) with SMTP id B4DA510AF9D3; Tue, 10 Apr 2018 13:36:27 +0000 (UTC) Date: Tue, 10 Apr 2018 16:36:27 +0300 From: "Michael S. Tsirkin" 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 Message-ID: <20180410163105-mutt-send-email-mst@kernel.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 10 Apr 2018 13:36:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 10 Apr 2018 13:36:30 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. As others said, we do not need to go overeboard. A couple of small vendor-specific quirks in qemu isn't a big deal. > > > > Paolo