Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3140256ybn; Fri, 27 Sep 2019 01:34:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaqxiknHa+pLbxNGDRLLAOIS2SV0mKyvQbJ4pk4ULfNXaGO3gDtCoK2JHicKKtw+m5M/qY X-Received: by 2002:aa7:d313:: with SMTP id p19mr3089619edq.197.1569573276928; Fri, 27 Sep 2019 01:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569573276; cv=none; d=google.com; s=arc-20160816; b=eJfnn8zAw/mCSOELz1DcDscQ/syEDOqQ9A9ZWsNRdpgmFQAecnzFSG+rePpup6ez5s eQJhusKMHjci4fABY4du2Q6GH2zvJPIZuETC0PmtDyDgI/FuJTERCs+46DSNVRyP+OG1 upW99br5xGNikm44n/CwJEaq5/ULvqpd8xG+ASm51CE15Ji0TumxoscR9NqsMMq/Un1r GKESGX3OWePsM62LKzmHgymwYN/yA0ssJi21+QFA+4GuTiNg2m6oPPMOKpVitspt3xt4 M/dkbfv26iPHKQ2F4ZK13Jx8qJU8oLZDYT+0F8ciFCznDP4C994s0rIPhUaBNvdSHgpu neLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Fb4qbu5y+uaaWcGOkdMOM4ffm1rhFfuPz+QmxqkfrYk=; b=jsXAuuLRlaAT6KdpguX5+dchiYyKT3g+VxIkZ/DYTeTqve77osnbxS8deYPc//kvQ/ LZBiRscvjVzj8/c8mPFTsMB3pRGfmzTy4IQgE2xrmUoyTlFFRh72GoSskPNATASv9pqh qRSyJ4FbU5tsHdHTHWh0gyU5pcjaluwV7UkIrXYnYUTtD/APKqh8+MVZHQg6y4jGHI1v VpC153+P0hQZzIsrLU5YWWch2chj3laA0mDp0XICR7LTym9IOCCQ2w2std0rGxA4xWuV zDzM6Gz2RmpBBBzY2GcQDj8EahP2b9d4d7XM8Ahemxx125gRs47SuyBIc7Q+YfT2dagL GBfg== 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 w14si991464edx.197.2019.09.27.01.34.11; Fri, 27 Sep 2019 01:34:36 -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 S1726118AbfI0Ibp (ORCPT + 99 others); Fri, 27 Sep 2019 04:31:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56188 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfI0Ibo (ORCPT ); Fri, 27 Sep 2019 04:31:44 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 770658535D; Fri, 27 Sep 2019 08:31:44 +0000 (UTC) Received: from [10.72.12.30] (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F9095C3FA; Fri, 27 Sep 2019 08:31:33 +0000 (UTC) Subject: Re: [PATCH] vhost: introduce mdev based hardware backend 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: <20190926045427.4973-1-tiwei.bie@intel.com> <1b4b8891-8c14-1c85-1d6a-2eed1c90bcde@redhat.com> <20190927045438.GA17152@___> <49bb0777-3761-3737-8e5b-568957f9a935@redhat.com> <20190927080410.GA22568@___> From: Jason Wang Message-ID: Date: Fri, 27 Sep 2019 16:31:31 +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: <20190927080410.GA22568@___> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 27 Sep 2019 08:31:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/9/27 下午4:04, Tiwei Bie wrote: > On Fri, Sep 27, 2019 at 03:14:42PM +0800, Jason Wang wrote: >> On 2019/9/27 下午12:54, Tiwei Bie wrote: >>>>> + >>>>> + /* >>>>> + * In vhost-mdev, userspace should pass ring addresses >>>>> + * in guest physical addresses when IOMMU is disabled or >>>>> + * IOVAs when IOMMU is enabled. >>>>> + */ >>>> A question here, consider we're using noiommu mode. If guest physical >>>> address is passed here, how can a device use that? >>>> >>>> I believe you meant "host physical address" here? And it also have the >>>> implication that the HPA should be continuous (e.g using hugetlbfs). >>> The comment is talking about the virtual IOMMU (i.e. iotlb in vhost). >>> It should be rephrased to cover the noiommu case as well. Thanks for >>> spotting this. >> >> So the question still, if GPA is passed how can it be used by the >> virtio-mdev device? > Sorry if I didn't make it clear.. > Of course, GPA can't be passed in noiommu mode. I see. Thanks for the confirmation. > > >> Thanks >>