Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1135728pxb; Wed, 10 Feb 2021 00:31:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIu41+kagVrIAp/jfZU600pAGJZEkNhdEPtFFQwe029jH9RbmY4o+UEYY33vFRRym4BWh4 X-Received: by 2002:a17:906:eca5:: with SMTP id qh5mr1815739ejb.161.1612945871808; Wed, 10 Feb 2021 00:31:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612945871; cv=none; d=google.com; s=arc-20160816; b=RozKRqjTWR0N7DJYFowPuysWxVXggjMPAbM1GSZHq/VGw8JmXQuGAU4jIFuRXppqMZ zRBAJG/3Snxqn2zTKgV4iUZ1CGQDKPFsL0vRV7c98RhDOI7QIvPudyARpHRZutnLRFm7 T7Re6TE0r6vwhwsDcDBqaIXfQ6+99fJHVc+W04oukv9SxzTHTcQZ0vAMaDQ0rESfF00P TNUyMQlWKBQdPLPe7V3fL2NsE5UwJlsdwxFO4Q3/IIbMr4I28RSQJfgpKZoiS7EYziod YZ9RHgY3SeoNC7EPXVbiANVUwNBPgqwbJ1k7yrzZCiYkKHXXWS5UrYK9iatihdOppr7y 8a2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=34e+K3bIAHZ2pffqYYmkrbH3MIGZjfK+/+CoC5oZ8Qk=; b=xSkXHpYidH5cTtQ+MT1wZhaaiWAvWtG+JrMwx8+3MX0P2M3xTDd4E16IzaSZfa/TCB Y35Tf2o/N4gUKOXQhpIhNhwxvq97pFA+gAV07xsY6QJnEmPM1BSK4y/ji4KDB8qTlWjB gt/SCPeIqMD0u59tEmiGzTcNjrMkHC8eqW46lULliEeWL4EpvGTWoZ69ms2Yk09kUUkv 4kSx8TyN9v2pV3Tes0/UEjvPJfLgBX2M+HYqxfCeyiD5efj1Fpk48Gls8eZizSX6m2xs fzExrmyon0V5QQS0HflYP1HDVW5yZQlDszJ/yNfk46djZPEnWSaCUZn0Z5C0KYvTItAR FUVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fRBhF7Po; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h13si833731ejt.667.2021.02.10.00.30.47; Wed, 10 Feb 2021 00:31:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fRBhF7Po; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230192AbhBJEpk (ORCPT + 99 others); Tue, 9 Feb 2021 23:45:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32797 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbhBJEpj (ORCPT ); Tue, 9 Feb 2021 23:45:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612932253; 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=34e+K3bIAHZ2pffqYYmkrbH3MIGZjfK+/+CoC5oZ8Qk=; b=fRBhF7Po+YdhyXBr+GvC4Amf5e12LyzUfqiDBTmQPyzgqtT+t6xa2F/TxgSELgCB973lXx 8UEF1+PDELMi1SKoGRS1gPIL+DISUQFkxr0g1lZTON2YcunWi9DGsQjBZQDNbo0D4hxoxN Li67zwyxbLfZ4H0crvlcnP2QAZTSF84= 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-397-moaQdiKINfSIGndpbArQsg-1; Tue, 09 Feb 2021 23:44:11 -0500 X-MC-Unique: moaQdiKINfSIGndpbArQsg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3AA941005501; Wed, 10 Feb 2021 04:44:10 +0000 (UTC) Received: from [10.72.12.223] (ovpn-12-223.pek2.redhat.com [10.72.12.223]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB9DD10013D7; Wed, 10 Feb 2021 04:44:04 +0000 (UTC) Subject: Re: [PATCH V3 16/19] virtio-pci: introduce modern device module To: "Michael S. Tsirkin" Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, shahafs@mellanox.com, lulu@redhat.com, sgarzare@redhat.com, rdunlap@infradead.org References: <20210104065503.199631-1-jasowang@redhat.com> <20210104065503.199631-17-jasowang@redhat.com> <20210209091916-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <721bf1dc-0b06-7f2a-9685-064a7c281366@redhat.com> Date: Wed, 10 Feb 2021 12:44:03 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210209091916-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/9 下午10:20, Michael S. Tsirkin wrote: > On Mon, Jan 04, 2021 at 02:55:00PM +0800, Jason Wang wrote: >> Signed-off-by: Jason Wang >> --- >> drivers/virtio/Kconfig | 10 +- >> drivers/virtio/Makefile | 1 + >> drivers/virtio/virtio_pci_common.h | 27 +- >> drivers/virtio/virtio_pci_modern.c | 617 ------------------------- >> drivers/virtio/virtio_pci_modern_dev.c | 599 ++++++++++++++++++++++++ >> include/linux/virtio_pci_modern.h | 111 +++++ >> 6 files changed, 721 insertions(+), 644 deletions(-) >> create mode 100644 drivers/virtio/virtio_pci_modern_dev.c >> create mode 100644 include/linux/virtio_pci_modern.h >> >> diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig >> index 7b41130d3f35..6b9b81f4b8c2 100644 >> --- a/drivers/virtio/Kconfig >> +++ b/drivers/virtio/Kconfig >> @@ -12,6 +12,14 @@ config ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS >> This option is selected if the architecture may need to enforce >> VIRTIO_F_ACCESS_PLATFORM >> >> +config VIRTIO_PCI_MODERN >> + tristate "Modern Virtio PCI Device" >> + depends on PCI >> + help >> + Modern PCI device implementation. This module implements the >> + basic probe and control for devices which are based on modern >> + PCI device with possible vendor specific extensions. >> + >> menuconfig VIRTIO_MENU >> bool "Virtio drivers" >> default y >> @@ -20,7 +28,7 @@ if VIRTIO_MENU >> >> config VIRTIO_PCI >> tristate "PCI driver for virtio devices" >> - depends on PCI >> + depends on VIRTIO_PCI_MODERN >> select VIRTIO >> help >> This driver provides support for virtio based paravirtual device > Looks like VIRTIO_PCI_MODERN is actually just a library that > virtio pci uses. Is that right? Right. > In that case just select it > automatically, let's not make users enable it manually. I've considered to do this but the problem is that the module depends on PCI so it can't be selected I think. Thanks >