Received: by 2002:a25:730a:0:0:0:0:0 with SMTP id o10csp4145771ybc; Fri, 25 Oct 2019 15:29:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMrWVsGUzp997cjyIF3Ugk4RTcySdlT4k4NIM4GYWSvnCih5lQ3rxIzRSUDu+bto5I5XNu X-Received: by 2002:aa7:c954:: with SMTP id h20mr6599588edt.159.1572042558618; Fri, 25 Oct 2019 15:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572042558; cv=none; d=google.com; s=arc-20160816; b=TfKP4PsHC9YtJCP7EnMZz+4K3nSYdGEY4CMvBMKmtM3vC/i934UCgRu7fbgWp1WQl0 sh7I+m7VUUc1P77U72jiF4mYJdWDzhaphzkl/6jHqNq37jQVjP3t8fxnMhmb3CxsCjK0 coYLgDNjRIV6prH+tNmBPAj5BNXWIakX/91JIU2RWdoq9ARemceBeGQUvesbWL2PZSzD 9IglGGoOIkOoLDOXdCwbjTs6FxYaumLgWacPdOU7Eac7ur1ocvg0+8YzEFyxqJRci4BT ZoOGApvS3i5J13N11tbLtiFYiAK1HfvnTBIDwinpwWzlhYwveXr19AD8H4mxspmXCqwE 6IyA== 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:references:cc:to:from:subject:dkim-signature; bh=UVoMMueYUvZ0eI/99xRHtgd80EIwZE7u1t/HBTorxLk=; b=W5Jl2eBoJrbpsxO1vSk3oLID0I/wGsOpZNPUZ51u5G4F85tb9Vk2maC2NY3kv19EDZ Anqz7izcZV9U4gAywPxtMST90kQ2Q1OHyGgB5Ent3PcFDdAilp/s7scu1wYbGVVAcn9f 3vB06ffsRWW3zFrGkwa4W1HGwmq9C5eu8/Sko1zc+sX2NF9age+6lFFj1w+RkYHEu978 Yk0zdGZiF0lzvrbCAGNtb6aYB/TwQ2PS5r2loX9m+dX8WD+4JnnD31AbEbGWBVh7PTq6 oLZu4tyxBIlt6Lz2yaNqIjqikTZpatfUgV//gZm4An/DjRtKrrLGyQHxtPbJC7pw20hW L8cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CnVy8qTu; 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=pass (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 k24si2156807ejz.417.2019.10.25.15.28.52; Fri, 25 Oct 2019 15:29:18 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CnVy8qTu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408901AbfJYJzQ (ORCPT + 99 others); Fri, 25 Oct 2019 05:55:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:52366 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2393420AbfJYJzQ (ORCPT ); Fri, 25 Oct 2019 05:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571997315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UVoMMueYUvZ0eI/99xRHtgd80EIwZE7u1t/HBTorxLk=; b=CnVy8qTu145LnR3iFmrmWvmicVVYM7v8yuXrnpCj8yZTpswO96LH0qednG4VTVnKY+rOoS sEaFJl89pu9UGUXu0nwdsdIYFCAOkpAqwRmxaLi5RVHjp4TXmO6qI3HbGwFNH8Lqu9/SJb eEtnMH6bd99zWuKsGz2oPKQN95O0+0o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-42-29ZThwCIPJi-QKNlPM682w-1; Fri, 25 Oct 2019 05:55:10 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F6D91005500; Fri, 25 Oct 2019 09:55:09 +0000 (UTC) Received: from [10.72.12.249] (ovpn-12-249.pek2.redhat.com [10.72.12.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC3E160BEC; Fri, 25 Oct 2019 09:54:56 +0000 (UTC) Subject: Re: [PATCH v2] vhost: introduce mdev based hardware backend From: Jason Wang To: Tiwei Bie Cc: mst@redhat.com, alex.williamson@redhat.com, maxime.coquelin@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, dan.daly@intel.com, cunming.liang@intel.com, zhihong.wang@intel.com, lingshan.zhu@intel.com References: <47a572fd-5597-1972-e177-8ee25ca51247@redhat.com> <20191023030253.GA15401@___> <20191023070747.GA30533@___> <106834b5-dae5-82b2-0f97-16951709d075@redhat.com> <20191023101135.GA6367@___> <5a7bc5da-d501-2750-90bf-545dd55f85fa@redhat.com> <20191024042155.GA21090@___> <20191024091839.GA17463@___> Message-ID: Date: Fri, 25 Oct 2019 17:54:55 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 29ZThwCIPJi-QKNlPM682w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/24 =E4=B8=8B=E5=8D=886:42, Jason Wang wrote: > > Yes. > > >> =C2=A0 And we should try to avoid >> putting ctrl vq and Rx/Tx vqs in the same DMA space to prevent >> guests having the chance to bypass the host (e.g. QEMU) to >> setup the backend accelerator directly. > > > That's really good point.=C2=A0 So when "vhost" type is created, parent= =20 > should assume addr of ctrl_vq is hva. > > Thanks This works for vhost but not virtio since there's no way for virtio=20 kernel driver to differ ctrl_vq with the rest when doing DMA map. One=20 possible solution is to provide DMA domain isolation between virtqueues.=20 Then ctrl vq can use its dedicated DMA domain for the work. Anyway, this could be done in the future. We can have a version first=20 that doesn't support ctrl_vq. Thanks