From patchwork Mon Feb 27 09:18:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Longpeng(Mike)" X-Patchwork-Id: 5887 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2323616wrd; Mon, 27 Feb 2023 01:43:23 -0800 (PST) X-Google-Smtp-Source: AK7set/t02OlhfG2BWbIm/D3ZoLxD4y+GhVvPO0fcVDW456MbhQE2WBrvfctdM/JfB9sXvcqFm4B X-Received: by 2002:a17:907:ea2:b0:888:b764:54e5 with SMTP id ho34-20020a1709070ea200b00888b76454e5mr42348599ejc.71.1677491003733; Mon, 27 Feb 2023 01:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677491003; cv=none; d=google.com; s=arc-20160816; b=h67c5+uImQx8mAilVvmFf2CYt81ASbTum8Qcf4uzIby5IyjCLm/k3bAbnBp2SxGoHg +O5TT02hysPBZsWVmX93o+O6GK9YOrRJGneg+GF0QX3g3nUdQpT+bamfEVmoAj0uaNcx kWr+f5ODsd59Wy1OZeOy3aKUcUk1NerzGXGnfCk8+D0YZMqU/1JgP3qpzT66jd1g8Dpb zyIQhDZiz6LPTG18LhCFH2nvAu8f6WGRKW764dfNUcwPHGqETI7tQlvm5WQA3k0YaC3a pQD6qaW9OETxPU/GcGqIJ9TJuWI7j27aTaEOAEoNCzBTgWQT1aEE3R/fjl4RI+aoWQLQ V8sg== 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 :message-id:date:subject:cc:to:from; bh=SfWQDoT0x4npyAkp+6plMsvBGrZLkONbA4f59GzbLWI=; b=UOpobMDHtE4Tnj1bBCF34p/ukYgYVes5vjVeqPDSo4LIbMuQN6Jr05HaSjo2ykKFAx bUEsA1NdSeonMwIayUP6RaDDCtL6fzK/1hLHBz/r3rk6KW080QUBWfbUnR41ifUBYXuC UCJPmq6pWLzWv+W3wTxM8MOHRD6F7QwJCV6KnXa2mWXEicq7a5m6+upW016PxhY1bSXS YY/TTsEr5t5DENNCxGXVrA3nTA6AOrwVy01OnrETGrcPioX1sphtBfUeY0cBdhCDfSwY rsAtHR91agEeOTPNTLh9RUNbnPxOplE5Ad3Kg5DwCLxUMqX9lBs+5edtibrptVqKeKG7 xj9Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb34-20020a170907962200b008dc042cf51dsi10238626ejc.751.2023.02.27.01.43.01; Mon, 27 Feb 2023 01:43:23 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230048AbjB0JVg (ORCPT + 99 others); Mon, 27 Feb 2023 04:21:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjB0JVX (ORCPT ); Mon, 27 Feb 2023 04:21:23 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 484D34C03 for ; Mon, 27 Feb 2023 01:19:33 -0800 (PST) Received: from kwepemi100025.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PQFL623g3zrSJT; Mon, 27 Feb 2023 17:18:54 +0800 (CST) Received: from DESKTOP-27KDQMV.china.huawei.com (10.174.148.223) by kwepemi100025.china.huawei.com (7.221.188.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 27 Feb 2023 17:18:59 +0800 From: "Longpeng(Mike)" To: , CC: , , , , , , , , Longpeng Subject: [PATCH v4 0/2] vdpasim: support doorbell mapping Date: Mon, 27 Feb 2023 17:18:55 +0800 Message-ID: <20230227091857.2406-1-longpeng2@huawei.com> X-Mailer: git-send-email 2.25.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.148.223] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi100025.china.huawei.com (7.221.188.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1758975970905997795?= X-GMAIL-MSGID: =?utf-8?q?1758976806577739674?= From: Longpeng This patchset supports doorbell mapping for vdpasim devices. v3: https://lore.kernel.org/lkml/20230213070446-mutt-send-email-mst@kernel.org/T/ v2: https://lore.kernel.org/lkml/CACGkMEtdT5fG=ffbpQadkGmzHf6Ax-+L50LsriYqJaW++natMg@mail.gmail.com/T/ Changes v3->v4: - use WRITE_ONCE [Jason] - start/stop periodic work when create/destroy vdpasim device [Jason] Changes v2->v3: - add a new callback named get_vq_notification_pgprot to vdpa_config_ops [Jason] - remove the new added module parameter 'parameter' [Jason] - opencode the schedule/cancel_delayed() [Jason] Changes v1->v2: - support both kick mode and passthrough mode. [Jason] - poll the notify register first. [Jason, Michael] Longpeng (2): vdpa: support specify the pgprot of vq notification area vdpasim: support doorbell mapping drivers/vdpa/vdpa_sim/vdpa_sim.c | 67 ++++++++++++++++++++++++++++++++ drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 ++ drivers/vhost/vdpa.c | 4 +- include/linux/vdpa.h | 9 +++++ 4 files changed, 82 insertions(+), 1 deletion(-)