Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp25462rdb; Wed, 18 Oct 2023 16:48:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuXrvDkdfQnpCS2CH2G2KvUD5ZhjRI7aIbT08snN8jX/IhUC6caeWL3SLDnOL+O1+Va1Md X-Received: by 2002:a05:6808:180f:b0:3b2:e4bd:17e1 with SMTP id bh15-20020a056808180f00b003b2e4bd17e1mr734492oib.24.1697672930289; Wed, 18 Oct 2023 16:48:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697672930; cv=pass; d=google.com; s=arc-20160816; b=SMnQeHYb8mAUyeK1VyjNp/IKWvL6d2kn/QJXpKJPPXdkCwTtGer2bPbVXIWbucPSmY oV20mwfCsB31NWfgQNb78wtPwMH7IFVDRzrT18EibWgkd5hlBi72+MREgxB4+8p+hB7w SmxB8vjGQRSti9oACJr2y2Gjp9oVqqc2Jz1IYRf1RwNhhErjwfIV5L0Q8wWtsHuL8mya qwEB7hhNMU+PT1S+cPHrMuhVkSC3iq2q0au5D5lFbCfYAwx76j29ZL9xSiRM1nxHVHxr HH5Zqx8ct8AUMNQ+hBDem/4l5xPnBGCeE4ojmbcyzlOWv92fVbmAH69inlE+Jiy40vDQ F9wA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=jZ2ztBDuE1nVqB5i58AwsA3rQ18vsZArxDIvTBOu8kk=; fh=jR6wkYMO17pBleYCfT1gCPMJUG2RTvdSiZBoZagmQlg=; b=uVrShK1S75ckiWJ+lzL6iP3PREXiIOXL6Kqdb84eXy+kmascaE7Mh5f5lZZPv9ULdO Tc4qSliFxtPNUjju62fCs6u5jR7NfQpaIR8zFj+/eYHI0J+PcCbROyfP3LATRd2Md2c4 JHzPVcpHgT9TNPZmS7tbcZr/xN84lHYDpvpoh5Ra/KLPzk61q13ggkMkuUurTZG9KWHp 0CYOYfIHNVuQTiZm4NsWjmwfdD23kCrWtnoPoHZJqvoNx1lYN2dbh7R2k5w+2SkAwsII m0blihM49USu+I6L4g9DXa6F2MhgfKHPdzoKbWfShgGsQDJ+P2qVB/MYNtN3dEG8ausw YCpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=nlISE4v9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tnpX9ZZi; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x4-20020a63db44000000b005b7c7efed1csi3195761pgi.295.2023.10.18.16.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 16:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=nlISE4v9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tnpX9ZZi; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 87D7280DFA4F; Wed, 18 Oct 2023 16:48:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232078AbjJRXs3 (ORCPT + 99 others); Wed, 18 Oct 2023 19:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbjJRXs1 (ORCPT ); Wed, 18 Oct 2023 19:48:27 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2413110F for ; Wed, 18 Oct 2023 16:48:25 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39IIp5eT018065; Wed, 18 Oct 2023 23:48:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=jZ2ztBDuE1nVqB5i58AwsA3rQ18vsZArxDIvTBOu8kk=; b=nlISE4v9CPpcsK343IaC5vETg05gdNQBOswh8Sjl4f4iXo+6oMJQEW8+t993/4zaS4MC zjngcKElCBJt7s4e/o8TvB61TuGRj0RR9F5QDK7tFA5S0hlgOCpgOyXgBWizh7nHBl8P 3/qYIR0UpZPKtOT1ST2aqKDQ0/91kDsQmmmaZT6TUBal3gnJ42dG21VvGolBpwgRl845 AGRZC13aft1MYfpiUQvkmmAq8QiSoUWBvfm/krJMw98+T7G+vWcZP/eX3Cdnqmm0g6ob ZJBpN6MDUof1nxeQG51IFVh6CFImfb7DOVZM8+4Hb1Ykc2UJiN3NkYc0RvdqqSLGKaUW hA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3tqkhu8wxk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Oct 2023 23:48:16 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 39ILo3c9040665; Wed, 18 Oct 2023 23:48:15 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2041.outbound.protection.outlook.com [104.47.56.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3trfypetkn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Oct 2023 23:48:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fbv1sBtKDhkLuXt265Q/S4Z5s4f3GEc+Md0teeAfdKv37MTRZ53fFcplcbhntAbhZpymLjKM09D2hvhXUkuQg5BC/yPaEq0aGHaR9436DNJoBDj8Ob/97csawRRgnOFnikZPQ8H0ZhVKkZRmQbF0Pg7k8xWyGB9OfUyhoa7gsiEcCeHf0BuhIBarrhQBba1aYRdMP4rg/BKAJfyM815kCaqFt01wJ1kCub5bRGZE9yAOxD2ZBY9LFhd6X+YNuJcN6o2InTyFdTxXIi+qvPhuzfWuKdzeQTtOHv6LK/WzQ5mlDwo3BMZrFsIxgrqaxOQuQWtFnaLCxiOdopyhmEznYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jZ2ztBDuE1nVqB5i58AwsA3rQ18vsZArxDIvTBOu8kk=; b=WH0rU2X4RNx/fdu5tzxgJykdi1CeY8Mbfa5M5+gAwYdOa9eEA/uTpyreoYn1gNUa+zmnZ5MUEAaKYVE2MkMuUWZkxEGR8Rm2D3p67BvDk/Mzaj0LOAjK50WXXIbbA6/tNBuyhVs95aiT9B+nXfEqjTg3Zn5ilZ+JAm1dOxRsKu8Ajm+hSTpWJ2TQDPyWN6DjajaXDEAfaspkNkEVjP9t4vyvXdd/3qOQXweIN6KIin/h075cPGYJCFE9wxqhQf5tkqYxTZgPz63sY2L/ASiH1zxKHMQG6Dfbn/v6TvwGIFdkUMHp5GoqpT7XR4EFuFmgk17fYs4iMChzX/NPZs9HvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jZ2ztBDuE1nVqB5i58AwsA3rQ18vsZArxDIvTBOu8kk=; b=tnpX9ZZiN4qwy8geK/+rBKBj3HMeleA5sWsomuPyfPld9FN9AOgVLwUbg04o7+/bffDWFUCYJLWuwg4ZSHTlWXyeKcuvBPmJbCIR/t6kpopWw/5yPY9REjjKbYSDDEV8E6nf1t9Z+wHLF7f1dOkFDilTYKv2L781hxJu7UzPBsY= Received: from MW4PR10MB6535.namprd10.prod.outlook.com (2603:10b6:303:225::12) by CH0PR10MB5321.namprd10.prod.outlook.com (2603:10b6:610:c9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Wed, 18 Oct 2023 23:47:54 +0000 Received: from MW4PR10MB6535.namprd10.prod.outlook.com ([fe80::5393:c70f:cefa:91c1]) by MW4PR10MB6535.namprd10.prod.outlook.com ([fe80::5393:c70f:cefa:91c1%3]) with mapi id 15.20.6886.034; Wed, 18 Oct 2023 23:47:54 +0000 Message-ID: <171a1147-2099-46da-81f1-fc953e9410e2@oracle.com> Date: Wed, 18 Oct 2023 16:47:48 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v2 PATCH] vdpa_sim: implement .reset_map support Content-Language: en-US To: Stefano Garzarella Cc: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <1697605893-30313-1-git-send-email-si-wei.liu@oracle.com> From: Si-Wei Liu Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BL0PR02CA0117.namprd02.prod.outlook.com (2603:10b6:208:35::22) To MW4PR10MB6535.namprd10.prod.outlook.com (2603:10b6:303:225::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6535:EE_|CH0PR10MB5321:EE_ X-MS-Office365-Filtering-Correlation-Id: 40f01ccf-0cfc-4c0a-11dc-08dbd034a527 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DqHGu/F18P4QNjZzZHg3YUssHiOAjt7EeJFqNAMdab7h5qWD4FtQCo6QApNSzFwNxtKTFtuLvVLqC/rcknw0VYA5n2AcREtRQhz4vs4Oo6H3tiPX3RgMtuGUkn3fyMwdWFALrA4cbCNq0dbWrxDorrsh2HTRyUhtjmBJUi280BaOAd60HiqettIn5iiZ4yyO94IwKuPeD4qwD9AQk5cuh7laBQErDYD36XMzLC54r7gQnb05PGXUs4rtvIGdTkIAlWzR0CT5djP7yoU0cXT9YEJBxUYgn2KplSutjs6Vnmd+Oq4mj3EIw5pzvyfIbzUg8unETvXdJR9Vda5ueJQ30TENIDM/bKI3c1Gm9r3McUEW4LMKDIM+k1myy1zArjQrStPscrMzydxnjUzq0s5St05n7Ez4ISnXTjM8cTIkXcPUHRyN1jAqrn9Ay9fxDNucgjBok+hQX92kdE/Oots6kBKqCBfHy6y1acn84dLEWA0gNkcNr/1tV8ONcENBNoiLYO0TPuqqcWS7dWo0F5YRaPpuBe0yYgVrazJGfhZ5WzRpln2hGkaic6vIVjHFZcYCcu2vKKmbBh+V6kU0iIIKEbFif0/5iRp5qLjdfrAI4x4tXZqfWRc8yf/nfivvEBJFrQyI5OMPemB0IGIKE2t7CvE1GXeNjo+4VO8xt9YthR4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR10MB6535.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(39860400002)(136003)(396003)(366004)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(5660300002)(31686004)(66556008)(316002)(66946007)(6916009)(66476007)(8936002)(478600001)(8676002)(6486002)(966005)(4326008)(38100700002)(83380400001)(31696002)(6512007)(86362001)(2616005)(41300700001)(36756003)(53546011)(6666004)(6506007)(26005)(36916002)(2906002)(142923001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RVc4dFdhelZvT2lKblR5L2FtaXlvNkdVeVFZYTdicXBLckNaWGxUTmhVN2Vt?= =?utf-8?B?TzhWZjBNSTR3ZldtMjVwRXoyL1Z1dWpnbExvdXc2YXFQZ2tpQU1WY1Q4Q3pT?= =?utf-8?B?TGRFL0Iva1pTbVpKZ3JaV1RsVHRTa2lTcUdKUjlsOXdtWER5Lzg1MVVVZHNs?= =?utf-8?B?WlZoZ2EzZDEzUE8xeUx6YkQwS29zZ1B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KckZe/wEQ9Y3u4wiWjj9cTShHkyQ8U+GuesLu5KYS6K2cvy7RrFD585ZVMcBmHBrVr/JJ96nPZoGkfOtUwbDM+k+46BgVNfXWXl9R X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40f01ccf-0cfc-4c0a-11dc-08dbd034a527 X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6535.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 23:47:53.7299 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: b9DjPsK6fpjghp+jZENoTYum2naPwzBrMrTFLdhq6fJ5yzKEI619VGzsevLkc6Gmt8xDoRo0Fdcvbrl4loA7PQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5321 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-18_18,2023-10-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310180197 X-Proofpoint-GUID: MxiAhUpqLFcoK8qyRC2OyzllKxIvt1If X-Proofpoint-ORIG-GUID: MxiAhUpqLFcoK8qyRC2OyzllKxIvt1If X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 16:48:43 -0700 (PDT) On 10/18/2023 1:05 AM, Stefano Garzarella wrote: > On Tue, Oct 17, 2023 at 10:11:33PM -0700, Si-Wei Liu wrote: >> RFC only. Not tested on vdpa-sim-blk with user virtual address. >> Works fine with vdpa-sim-net which uses physical address to map. >> >> This patch is based on top of [1]. >> >> [1] >> https://lore.kernel.org/virtualization/1696928580-7520-1-git-send-email-si-wei.liu@oracle.com/ >> >> Signed-off-by: Si-Wei Liu >> >> --- >> RFC v2: >>  - initialize iotlb to passthrough mode in device add > > I tested this version and I didn't see any issue ;-) Great, thank you so much for your help on testing my patch, Stefano! Just for my own interest/curiosity, currently there's no vhost-vdpa backend client implemented for vdpa-sim-blk or any vdpa block device in userspace as yet, correct? So there was no test specific to vhost-vdpa that needs to be exercised, right? Thanks, -Siwei > > Tested-by: Stefano Garzarella > >> --- >> drivers/vdpa/vdpa_sim/vdpa_sim.c | 34 ++++++++++++++++++++++++-------- >> 1 file changed, 26 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c >> b/drivers/vdpa/vdpa_sim/vdpa_sim.c >> index 76d41058add9..2a0a6042d61d 100644 >> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c >> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c >> @@ -151,13 +151,6 @@ static void vdpasim_do_reset(struct vdpasim >> *vdpasim) >>                  &vdpasim->iommu_lock); >>     } >> >> -    for (i = 0; i < vdpasim->dev_attr.nas; i++) { >> -        vhost_iotlb_reset(&vdpasim->iommu[i]); >> -        vhost_iotlb_add_range(&vdpasim->iommu[i], 0, ULONG_MAX, >> -                      0, VHOST_MAP_RW); >> -        vdpasim->iommu_pt[i] = true; >> -    } >> - >>     vdpasim->running = true; >>     spin_unlock(&vdpasim->iommu_lock); >> >> @@ -259,8 +252,12 @@ struct vdpasim *vdpasim_create(struct >> vdpasim_dev_attr *dev_attr, >>     if (!vdpasim->iommu_pt) >>         goto err_iommu; >> >> -    for (i = 0; i < vdpasim->dev_attr.nas; i++) >> +    for (i = 0; i < vdpasim->dev_attr.nas; i++) { >>         vhost_iotlb_init(&vdpasim->iommu[i], max_iotlb_entries, 0); >> +        vhost_iotlb_add_range(&vdpasim->iommu[i], 0, ULONG_MAX, 0, >> +                      VHOST_MAP_RW); >> +        vdpasim->iommu_pt[i] = true; >> +    } >> >>     for (i = 0; i < dev_attr->nvqs; i++) >>         vringh_set_iotlb(&vdpasim->vqs[i].vring, &vdpasim->iommu[0], >> @@ -637,6 +634,25 @@ static int vdpasim_set_map(struct vdpa_device >> *vdpa, unsigned int asid, >>     return ret; >> } >> >> +static int vdpasim_reset_map(struct vdpa_device *vdpa, unsigned int >> asid) >> +{ >> +    struct vdpasim *vdpasim = vdpa_to_sim(vdpa); >> + >> +    if (asid >= vdpasim->dev_attr.nas) >> +        return -EINVAL; >> + >> +    spin_lock(&vdpasim->iommu_lock); >> +    if (vdpasim->iommu_pt[asid]) >> +        goto out; >> +    vhost_iotlb_reset(&vdpasim->iommu[asid]); >> +    vhost_iotlb_add_range(&vdpasim->iommu[asid], 0, ULONG_MAX, >> +                  0, VHOST_MAP_RW); >> +    vdpasim->iommu_pt[asid] = true; >> +out: >> +    spin_unlock(&vdpasim->iommu_lock); >> +    return 0; >> +} >> + >> static int vdpasim_bind_mm(struct vdpa_device *vdpa, struct mm_struct >> *mm) >> { >>     struct vdpasim *vdpasim = vdpa_to_sim(vdpa); >> @@ -759,6 +775,7 @@ static const struct vdpa_config_ops >> vdpasim_config_ops = { >>     .set_group_asid         = vdpasim_set_group_asid, >>     .dma_map                = vdpasim_dma_map, >>     .dma_unmap              = vdpasim_dma_unmap, >> +    .reset_map              = vdpasim_reset_map, >>     .bind_mm        = vdpasim_bind_mm, >>     .unbind_mm        = vdpasim_unbind_mm, >>     .free                   = vdpasim_free, >> @@ -796,6 +813,7 @@ static const struct vdpa_config_ops >> vdpasim_batch_config_ops = { >>     .get_iova_range         = vdpasim_get_iova_range, >>     .set_group_asid         = vdpasim_set_group_asid, >>     .set_map                = vdpasim_set_map, >> +    .reset_map              = vdpasim_reset_map, >>     .bind_mm        = vdpasim_bind_mm, >>     .unbind_mm        = vdpasim_unbind_mm, >>     .free                   = vdpasim_free, >> -- >> 2.39.3 >> >