From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 171FDC4360C for ; Fri, 27 Sep 2019 03:51:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5F052146E for ; Fri, 27 Sep 2019 03:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729160AbfI0Dvt (ORCPT ); Thu, 26 Sep 2019 23:51:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57093 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728995AbfI0Dvs (ORCPT ); Thu, 26 Sep 2019 23:51:48 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 7FA283B58C; Fri, 27 Sep 2019 03:51:48 +0000 (UTC) Received: from [10.72.12.160] (ovpn-12-160.pek2.redhat.com [10.72.12.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id 295B1614C1; Fri, 27 Sep 2019 03:51:37 +0000 (UTC) Subject: Re: [PATCH] vhost: introduce mdev based hardware backend From: Jason Wang To: Tiwei Bie , mst@redhat.com, alex.williamson@redhat.com, maxime.coquelin@redhat.com Cc: kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, zhihong.wang@intel.com, lingshan.zhu@intel.com References: <20190926045427.4973-1-tiwei.bie@intel.com> <1b4b8891-8c14-1c85-1d6a-2eed1c90bcde@redhat.com> Message-ID: <996bcaa3-1b13-2520-5be4-8a8f9c8c71d6@redhat.com> Date: Fri, 27 Sep 2019 11:51:35 +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: <1b4b8891-8c14-1c85-1d6a-2eed1c90bcde@redhat.com> 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 27 Sep 2019 03:51:48 +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 上午11:46, Jason Wang wrote: > + > +static struct mdev_class_id id_table[] = { > +    { MDEV_ID_VHOST }, > +    { 0 }, > +}; > + > +static struct mdev_driver vhost_mdev_driver = { > +    .name    = "vhost_mdev", > +    .probe    = vhost_mdev_probe, > +    .remove    = vhost_mdev_remove, > +    .id_table = id_table, > +}; > + And you probably need to add MODULE_DEVICE_TABLE() as well. Thanks