Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp443251pxb; Wed, 22 Sep 2021 05:48:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoRr9ruTqdiUkVScVSyRW07WEN1kRqOuUHV+6dXwNfm85vNBXrG5oQpM8XWqQZYEngMACt X-Received: by 2002:a17:907:9604:: with SMTP id gb4mr41470646ejc.142.1632314910847; Wed, 22 Sep 2021 05:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632314910; cv=none; d=google.com; s=arc-20160816; b=04gJFgWj8dTEn0oy5qQb1iBIbXTYnrC1siOZhkAoZpZ4z76EypQ1yJ8Whmcxi299FE wikjIMjTPfhyBx1lCGAervxlQ9HJENIB47JAp8ZO2QvEY8UcEdD+w4AB5+UN6ysEHWyW QFzN/IeULdAWvhxnSdjqUJF/PNxRFkF9SkZLNn5ojC2pkc8iWkZqmlb3jqyqhoV4UWGe 2ux4g/+S0PWy0+nORMh6G+8wvPs1E9sVBwxV7OgKIEciYD+Z8/uD3fmxUYxc5Md9/uP3 vvJpJvls8XnLy+sHQm0K+75rZ/259K9u+kTufjHuPGHhHnzUC9DnepquDRgwzmZ0+rlI l9aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lfd4o2i+XWWmc96x2PhNNjWqShoCrVb2REo4ZDfXgpo=; b=TIQSyaBsTsAuQJF6Qly3E9fLDls0HxTIvYTWEEKPjf8t0Db6yWD0OQofep6JqOtuMC yx3rb55AlCDs/GfU2n7qDWyz3blODLuVP5vq/0aHDBVVoQXCgBt5+9qWJhDcnqCEXFSB Ld6OHaew2wyU1kbZcVrRinN8Nsvturti67cU/pP3zyVXaYqpF9t5KWBjdTUHKy1RSTdd Wm45PELFrF8bJTPX1pMffJzmMu+CNWIB5TMvNvt3YrrlFvFzocviX4eQzTy7yTbjJb+a J3ZQCkFzVTh4q8CY+oW0uTNQjZBDisd6CC2oPuWmzzx0M+u8vG2uR+8BIH9/2qYhv2tr HqBg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl17si2528408ejc.417.2021.09.22.05.48.07; Wed, 22 Sep 2021 05:48:30 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236040AbhIVMsR (ORCPT + 99 others); Wed, 22 Sep 2021 08:48:17 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:46886 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbhIVMsR (ORCPT ); Wed, 22 Sep 2021 08:48:17 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R771e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=wuzongyong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UpEJoj9_1632314798; Received: from localhost.localdomain(mailfrom:wuzongyong@linux.alibaba.com fp:SMTPD_---0UpEJoj9_1632314798) by smtp.aliyun-inc.com(127.0.0.1); Wed, 22 Sep 2021 20:46:45 +0800 From: Wu Zongyong To: wuzongyong@linux.alibaba.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, mst@redhat.com Cc: wei.yang1@linux.alibaba.com Subject: [PATCH v3 0/7] vDPA driver for Alibaba ENI Date: Wed, 22 Sep 2021 20:46:23 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series implements the vDPA driver for Alibaba ENI(Elastic Network Interface) which is build based on virtio-pci 0.9.5 specification. Changes since V2: - add new attribute VDPA_ATTR_DEV_MIN_VQ_SIZE instead VDPA_ATTR_DEV_F_VERSION_1 to guide users to choose correct virtqueue size as suggested by Jason Wang - present ACCESS_PLATFORM in get_features callback as suggested by Jason Wang - disable this driver on Big Endian host as suggested by Jason Wang - fix a typo Changes since V1: - add new vdpa attribute VDPA_ATTR_DEV_F_VERSION_1 to indicate whether the vdpa device is legacy - implement dedicated driver for Alibaba ENI instead a legacy virtio-pci driver as suggested by Jason Wang - some bugs fixed Wu Zongyong (7): virtio-pci: introduce legacy device module vdpa: fix typo vp_vdpa: add vq irq offloading support vdpa: add new callback get_vq_num_min in vdpa_config_ops virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max,min} vdpa: add new attribute VDPA_ATTR_DEV_MIN_VQ_SIZE eni_vdpa: add vDPA driver for Alibaba ENI drivers/vdpa/Kconfig | 8 + drivers/vdpa/Makefile | 1 + drivers/vdpa/alibaba/Makefile | 3 + drivers/vdpa/alibaba/eni_vdpa.c | 554 +++++++++++++++++++++++++ drivers/vdpa/vdpa.c | 5 + drivers/vdpa/virtio_pci/vp_vdpa.c | 12 + drivers/virtio/Kconfig | 10 + drivers/virtio/Makefile | 1 + drivers/virtio/virtio_pci_common.c | 10 +- drivers/virtio/virtio_pci_common.h | 9 +- drivers/virtio/virtio_pci_legacy.c | 101 ++--- drivers/virtio/virtio_pci_legacy_dev.c | 220 ++++++++++ drivers/virtio/virtio_vdpa.c | 25 +- include/linux/vdpa.h | 6 +- include/linux/virtio_pci_legacy.h | 44 ++ include/uapi/linux/vdpa.h | 1 + 16 files changed, 921 insertions(+), 89 deletions(-) create mode 100644 drivers/vdpa/alibaba/Makefile create mode 100644 drivers/vdpa/alibaba/eni_vdpa.c create mode 100644 drivers/virtio/virtio_pci_legacy_dev.c create mode 100644 include/linux/virtio_pci_legacy.h -- 2.31.1