From patchwork Tue Jan 31 23:22:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Si-Wei Liu X-Patchwork-Id: 4785 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp91038wrn; Tue, 31 Jan 2023 15:25:45 -0800 (PST) X-Google-Smtp-Source: AK7set+osFjU88qDlJcABDjeipjz0Fndj6JpLkYGMEWTSuVwXwr1qPMCBQFIx7r1UjxAuEsq2wUZ X-Received: by 2002:a17:90b:4c0b:b0:22c:6e01:2ae2 with SMTP id na11-20020a17090b4c0b00b0022c6e012ae2mr14331346pjb.46.1675207544749; Tue, 31 Jan 2023 15:25:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675207544; cv=none; d=google.com; s=arc-20160816; b=Pif99Tjpqeyf5OrAHRPS2eBdS04EANqK6+A4ohMgOdxp1fsWAOHx9yHSG/R0K9vC7/ 4odqVAeKwbPVsagLP6ghnfMIFH6qMbKm1FJUVFK+7z29nQYchwUctYnudAZ4xGk5S1dd sPrbB8+PLka8UP2gLYMOmoTnGG1rDGrM9016Zg9skUBNwUYbvahkW9B/wZl5yqzRhaPA H3unP0fmTMScHdNZ57643yoa07FCGSA1h3lXQX0QzWC0A6F3qJLSr/w7wJdcXdzhOq59 K0RKSKZRR65FL7JWwsuc0ZehYrNWf18We95ttjG114LcFYCnibmRKUzBZBst7npHZDSe sWBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=MF5vl8KpdSDsfc6yq79/O0/7Q+RiRABQOe1tPYztTz8=; b=GbE94gMuRQy/CDKa61dFbrMSh13CGRwMkYbed+lKmQSdw3Wkn9CkgFWXRSMdtZ0lr4 h13B70fGcwurp41QQ5E05zsiCRLwSi6GJu15Q6NMVIEWudAc7JqJCwcbFGl5UCheLEzb EBvNVElFqE1qUvwDaRcbWEjZ5xS4p7XCwiD3Ky7qX199L5PQnYMjXhASggJ8zgqJSE1F g4o8Xni1B1ygYyJmnSJhFw1MFJojBikgXhMIvPhlgy/DOB3L5Bl/J6gJMfBPYfvFf/nL LTjdM2zVG1J/KS3ALP1oW41DYzHTm4oWXgVj23GOjHKJcE8oDGcUl1ti6qKSEjhDikzF gJTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=2y4nj2EI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bb24-20020a17090b009800b0021918bc9a47si17402712pjb.174.2023.01.31.15.25.32; Tue, 31 Jan 2023 15:25:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=2y4nj2EI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232195AbjAaXXj (ORCPT + 99 others); Tue, 31 Jan 2023 18:23:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbjAaXX0 (ORCPT ); Tue, 31 Jan 2023 18:23:26 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E52AF758 for ; Tue, 31 Jan 2023 15:23:02 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30VIhvYp013722; Tue, 31 Jan 2023 23:22:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2022-7-12; bh=MF5vl8KpdSDsfc6yq79/O0/7Q+RiRABQOe1tPYztTz8=; b=2y4nj2EI2svk7/+Y+8B9qSHUOLVo/U9+W2hedell6ZKHuZIkFrrTneP0l1P3Smi38oA1 BZ9YmVJQvHoe7EWmz5aTuMgzlMmO1ril/Al1bCTnSn4J0oBVUbgZMoH7a2VYN4UIbRr+ NynQktu5ELlDb1WwCh32q29J7SAP9AzvFfXmFLe86a8srxogbMExzoJOETpDz61WpSwn Kdh0KtPZJ4/waO31GUjatFhXBQ7V1HyBG6RcAKAL6snp6eJnMBOKLIVEYPPXODRFJdZz +YGo4JSylgjgP9z2uXJSVS2QHKqrWt60sf9JOFoet276sw1ltYikzLyxwEYfNZY4yDza +A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ncvn9y05x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 Jan 2023 23:22:42 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30VN9OVi033826; Tue, 31 Jan 2023 23:22:41 GMT Received: from ban25x6uut24.us.oracle.com (ban25x6uut24.us.oracle.com [10.153.73.24]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3nct56fb9w-1; Tue, 31 Jan 2023 23:22:41 +0000 From: Si-Wei Liu To: mst@redhat.com, jasowang@redhat.com, parav@nvidia.com, elic@nvidia.com Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/7] features provisioning fixes and mlx5_vdpa support Date: Tue, 31 Jan 2023 15:22:18 -0800 Message-Id: <1675207345-22328-1-git-send-email-si-wei.liu@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-31_08,2023-01-31_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301310201 X-Proofpoint-GUID: NwHoSjWWSy4EFb_auIS8cKEjnt_wLqtM X-Proofpoint-ORIG-GUID: NwHoSjWWSy4EFb_auIS8cKEjnt_wLqtM X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756582355711044901?= X-GMAIL-MSGID: =?utf-8?q?1756582426442857149?= This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA: initial config export via "vdpa dev show" https://lore.kernel.org/virtualization/1666392237-4042-1-git-send-email-si-wei.liu@oracle.com/ --- v1 -> v2: - include specific attribute info to error message - move conditional feature presence in mlx5_vdpa config space to a separate patch - remove redundant check --- Si-Wei Liu (7): vdpa: fix improper error message when adding vdpa dev vdpa: conditionally read STATUS in config space vdpa: validate provisioned device features against specified attribute virtio: VIRTIO_DEVICE_F_MASK for all per-device features vdpa: validate device feature provisioning against supported class vdpa/mlx5: conditionally show MTU and STATUS in config space vdpa/mlx5: support device features provisioning drivers/vdpa/mlx5/net/mlx5_vnet.c | 71 ++++++++++++++++++++++------ drivers/vdpa/vdpa.c | 95 +++++++++++++++++++++++++++++++------- include/uapi/linux/virtio_config.h | 8 ++++ 3 files changed, 144 insertions(+), 30 deletions(-)