From patchwork Wed Jan 10 20:40:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Sistare X-Patchwork-Id: 187075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1044920dyi; Wed, 10 Jan 2024 12:45:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXuCS4BPxhADQj0GIT1Pd1MjTjkGRnK/uOA7xrhAG8jizU3KqIn3nnWyEu0X2XDJHBO6Bo X-Received: by 2002:aa7:dd11:0:b0:557:bfb7:662a with SMTP id i17-20020aa7dd11000000b00557bfb7662amr34988edv.43.1704919538180; Wed, 10 Jan 2024 12:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704919538; cv=none; d=google.com; s=arc-20160816; b=mtJG2BCKqvrAXH5fo/BDpFAc1+iHvtkmh4ZokFGOvGnGV+QlxWFmH77H32IBOSvp51 Kgz1N4ZTUtJgmDH0RPhp15+qzUbgA8en5SkECG/3HvZQ2jOgfX3gzhnsKaueNGufK+P1 kYdxqvE2toB4i7gPfOOni3FeCDDeO5LDpFYe+LZH2XfMr5Rgv3a1+s+DOm9YM4B35P7F wWJJBn0RImW58Pi7R2CJ6zPGJfkUHnquGGEkChm/nrXbb8Yvx60vxL5n1myN/qEINzgl zRNcwp+w0ZGhMTgG2F8PvsAfkTZLSYFHFI+giVyUzfm/hIA3oaxx6x+fOzHSzwioY3wE NGMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=hhvQOBFamiyiEmHuupz5eDq1YRqBcTmmT3w2YGrrD10=; fh=NLOUc4UpZ/0A9JrieYT9bxhjFpxay5qeZXON7PgxqoM=; b=Mr3Xa8UeGoo1P9jrftBdMhnzimKwFRlAumsotRqNJMQSTsPkeCeySy81OWleOPc2x6 Zaalwm3D2DyBGqpoDZgs8Zs2Pde9/zi+AXTMtCaDlsQBct7lXA0LUMr727WzEpBafn/N BDg67uJrCq4VbCqL7MB0XeMff/K/lZKWmqIHc1sbdJ0IHAdLvZvOAbdcwPQLCQioOeNu s6c6xGtWwvDw30HCVOHtAHzRVCwQ4td90WTj/UwTMR6H1VAYg11uNtowT81NEEz7lBZ9 U9KQSijj9TRLp1e7Y1FDfZLyPHLd75KaJwYyBxdTd8svCkkG0Os03WWMw1JooPOgSVZ/ TzFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=DHSE3yQK; spf=pass (google.com: domain of linux-kernel+bounces-22764-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22764-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q24-20020a50cc98000000b005541706439bsi2097267edi.558.2024.01.10.12.45.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 12:45:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22764-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=DHSE3yQK; spf=pass (google.com: domain of linux-kernel+bounces-22764-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22764-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C2CCB1F2351D for ; Wed, 10 Jan 2024 20:45:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 034BB57316; Wed, 10 Jan 2024 20:40:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DHSE3yQK" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACF6750243 for ; Wed, 10 Jan 2024 20:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40AJfjWG028143; Wed, 10 Jan 2024 20:40:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2023-11-20; bh=hhvQOBFamiyiEmHuupz5eDq1YRqBcTmmT3w2YGrrD10=; b=DHSE3yQK/9Ol1yXpkKhUrTD9n7+DqGMPNsRbhSRvzLSx+yCGCwkmc19UoFXFNpDAONU5 qYTSVX/3tqhOVUfu0lyDm0KTHx9VhQ6639pG8QAokUSJkyYk415uSo/wji2qGXIXkiKe K96+ihbtESCeHPwOZeNmmLJjySnN2xw572lmeABrD/mvCMN+8IeRG5jcHrEzQAdFol90 KrActpbdXASCsew+2eyLiNrSpMtxFGWePKz72r/rWrRtzEt1YqQCNC2PqK180Z8dPkST KHXkq6x184vrozJJ/XAK7eDTzQpn4YPrw+Zpw0Xnr/FcqTcS6pG/g2Q8C7Fzl+NXVRTj Cw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vj1m404ad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jan 2024 20:40:26 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 40AJJe28030160; Wed, 10 Jan 2024 20:40:26 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3vfutp5xcu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jan 2024 20:40:26 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 40AKeGrl005067; Wed, 10 Jan 2024 20:40:25 GMT Received: from ca-dev63.us.oracle.com (ca-dev63.us.oracle.com [10.211.8.221]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3vfutp5x5e-12; Wed, 10 Jan 2024 20:40:25 +0000 From: Steve Sistare To: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: "Michael S. Tsirkin" , Jason Wang , Si-Wei Liu , Eugenio Perez Martin , Xuan Zhuo , Dragos Tatulea , Eli Cohen , Xie Yongji , Steve Sistare Subject: [RFC V1 11/13] vdpa/mlx5: new owner capability Date: Wed, 10 Jan 2024 12:40:13 -0800 Message-Id: <1704919215-91319-12-git-send-email-steven.sistare@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1704919215-91319-1-git-send-email-steven.sistare@oracle.com> References: <1704919215-91319-1-git-send-email-steven.sistare@oracle.com> X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-10_10,2024-01-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401100163 X-Proofpoint-ORIG-GUID: CLFuHUGjgvH2x-cylsNPOygAE-HFhxhe X-Proofpoint-GUID: CLFuHUGjgvH2x-cylsNPOygAE-HFhxhe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787737709625048127 X-GMAIL-MSGID: 1787737709625048127 The mlx5 vdpa device supports ownership transfer to a new process, so advertise VHOST_BACKEND_F_NEW_OWNER. User virtual addresses are not used after they are initially translated to physical, so VHOST_IOTLB_REMAP is not required, hence VHOST_BACKEND_F_IOTLB_REMAP is not advertised. Signed-off-by: Steve Sistare --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 26ba7da6b410..26f24fb0e160 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -2562,7 +2562,8 @@ static void unregister_link_notifier(struct mlx5_vdpa_net *ndev) static u64 mlx5_vdpa_get_backend_features(const struct vdpa_device *vdpa) { - return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK); + return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK) | + BIT_ULL(VHOST_BACKEND_F_NEW_OWNER); } static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)