Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2582764ybc; Mon, 25 Nov 2019 00:22:57 -0800 (PST) X-Google-Smtp-Source: APXvYqw7/PuU8ssfh874sC/iCRDDkajn30cq5mZ5vUUpj0u0GnUR59Gq2kkb38+uC355kkqYM4le X-Received: by 2002:a17:906:b25a:: with SMTP id ce26mr35364492ejb.13.1574670176951; Mon, 25 Nov 2019 00:22:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574670176; cv=none; d=google.com; s=arc-20160816; b=NsvZekci+lD8TG3DTGNUZ2Rx56PFErmdKetDUoOda1JwVon0RU1NDVwlqGZVb3LJ9C I+eV9uSVlOFufdLIzLgrABejyB8E01Jyn+4Bc2PC2/kgDWiVBQ3YvwOee75uiKr7oTJA ZnyBNQtYd+KYBCxDsFTX9NA+/gDzwCG8Pv4VWdfs0Y7/YhX/QU3stihLpuGVBKFHjNPK BNb3sPgtXm4+iMVdpdHNPCc6sAeaMgAjYSCb1nrLzVkFxX4mWDwKwDhkkZ0NjRokxdPV 1JneEarTwWQRDbCHQT6gOHOxRDkVOxEAjrErZeOD8gNslGhjC+CvhDbDo0PIp7Gx8LtL X6IA== 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:dkim-signature; bh=VVpZi8JXk+Gn2x1ju+aRnIKTgySiGqpiCe8/VQiJ+ck=; b=vntQPEWvcbQGBUcgmUDyq4Z2TXyIfJU8nDHimsq7I2pPvJr6GsQ8RI3/26JkQisDHF cOqAWRbbrovvzvqpO63iYrwM1E0zHQ5wTLDErdi3zuyTkSjY1QC7mByOJq4CMj8T/Bqu nYQv8SBIZ5Azq62ZtqvsT2iShOrL49eJ8hC0y5uAbKf5zN1O1xAEHI5gpBfx2saFz2F+ sTOPLu0289Pv3v4kfDI53+QkZORnkU69zWb3xcS8xpfZTyBu6PqQoCMla/BvA6CBHy1S uWn8kTRQtUocyZx6ETn9uV62+8CMvpUh1JM++B+bDhvQqBLueUJtYIuEK0aFkrrKOGaD pW5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+RR4A4M; 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 i30si5123541edd.124.2019.11.25.00.22.32; Mon, 25 Nov 2019 00:22:56 -0800 (PST) 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=g+RR4A4M; 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 S1727316AbfKYIUE (ORCPT + 99 others); Mon, 25 Nov 2019 03:20:04 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:32170 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725763AbfKYIUD (ORCPT ); Mon, 25 Nov 2019 03:20:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574670002; 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=VVpZi8JXk+Gn2x1ju+aRnIKTgySiGqpiCe8/VQiJ+ck=; b=g+RR4A4MyQjGtFvJx+fWUiAZSrZfgacwiqVo53ClRdPlP9CgkjPolr7RaA8UAxQQiJ0B9X bVFC/lOiaN8qihIjU1rGb8E96K455DtCL1y96k3Tsyc4yCZROJgaDmPXhXkX9qNQJuHnWG WOci340roOR4uj2qB0WHGS9IfkeLFDY= 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-354-IIzbJ_fvOUGlXrfXA5iL8g-1; Mon, 25 Nov 2019 03:20:00 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C663110CE780; Mon, 25 Nov 2019 08:19:58 +0000 (UTC) Received: from [10.72.12.44] (ovpn-12-44.pek2.redhat.com [10.72.12.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2EF04608B0; Mon, 25 Nov 2019 08:19:47 +0000 (UTC) Subject: Re: [RFC V4 2/2] This commit introduced IFC operations for vdpa To: Zhu Lingshan , mst@redhat.com, alex.williamson@redhat.com Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, netdev@vger.kernel.org, dan.daly@intel.com, cunming.liang@intel.com, tiwei.bie@intel.com, jason.zeng@intel.com, zhiyuan.lv@intel.com References: <1574241431-24792-1-git-send-email-lingshan.zhu@intel.com> <1574241431-24792-3-git-send-email-lingshan.zhu@intel.com> From: Jason Wang Message-ID: Date: Mon, 25 Nov 2019 16:19:46 +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: <1574241431-24792-3-git-send-email-lingshan.zhu@intel.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: IIzbJ_fvOUGlXrfXA5iL8g-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/11/20 =E4=B8=8B=E5=8D=885:17, Zhu Lingshan wrote: > + > +=09if (!strcmp(kobj->name, "ifcvf-virtio_mdev")) > +=09=09mdev_virtio_set_class_id(mdev,MDEV_VIRTIO_CLASS_ID_VIRTIO); > + > +=09if (!strcmp(kobj->name, "ifcvf-vhost_mdev")) > +=09=09mdev_virtio_set_class_id(mdev,MDEV_VIRTIO_CLASS_ID_VHOST); > + > +=09mdev_set_drvdata(mdev, adapter); > +=09mdev_set_iommu_device(mdev_dev(mdev), dev); > +=09adapter->mdev_count--; > + To avoid confusion, it's better to call mdev_set_iommu_device() only for=20 the case of vhost. For virtio, it doesn't depends on that to work. Thanks