Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp187068rdb; Thu, 16 Nov 2023 16:12:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7+bQSoZGUv7lQSITfI+17bCDZp2nNzanSQm31zmT95pcIpEkLT3axZBNoCSrakVZoucOs X-Received: by 2002:a17:902:e5cd:b0:1cc:33e7:95f5 with SMTP id u13-20020a170902e5cd00b001cc33e795f5mr4850735plf.33.1700179968994; Thu, 16 Nov 2023 16:12:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700179968; cv=pass; d=google.com; s=arc-20160816; b=sPZd9sgfSzs5jsM7Lnz6qUP8FA/EYQvKJ8Qr9C4i1LSf0Ns+XBxsC+zuN/LUDE2Pnp ScXtdn8VTlKUEZ4UqNO5vK1/xbu8xtDYrlLoZDKqufN6krZhTl7CNBFKtG6mhBiukMol cfHEXfKEu+/RahYqHt/gPjmV5BQseHrObLH1h9GEL7opdf7WdxYlNYNY0FyPYNdWvl7C 5luQ7t+jZ3qzgHQ7WkFnV3V6RjUsb3/IYENE0WNtVJdaClxXng/yaFl+HSQ4fRhWGyxw U49rnqr7Gt2Eg42qlrTm02xMRRDHIVa1OYHf3KgcAi5cwFUD+/UbU6c58LKSf8iiL0Gm mwNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=JTyoY2i8Xx9g2b+pqJcCalArIA38GvHGlgllY/9ujog=; fh=lBBaLJko1QugYzFKdQRCcg/1umbDT+qI/sM7W6WplGU=; b=DGRZfaXlCBIbW8K83iGuRa73Q1nFHvcsgHKlfIao4o+LIQkYMP1oWlqqG30xpeszwA uzF3J1tLVy71lASGuSoRVaO4uWzre6NGif1BPZfl/fIezq9rCsvNLameJDLt1+xKhPCr PeaZRudY3zEP0SPzLBjlt6xUdZnbGzIjSqvNIZqw4ON/IRRT1FbCfaCJ/OPZWko+tS1u uGzCQ0iVZoRVdtdiYF8jTmcDKBnptivL3Lj+emy6VNjixrO324iwTM+cNuMeYU7/X4xL jOsCYoF8m53gxDjrojMsVb5pARcnwgiud2MBAy9grIWva9ZpOe4TExzk7A5h6JA5S7Yy nmyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=zE2hymqt; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b16-20020a63cf50000000b005b7160263f2si632557pgj.154.2023.11.16.16.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 16:12:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=zE2hymqt; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 07DCA81B6D54; Thu, 16 Nov 2023 16:12:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbjKQAM2 (ORCPT + 99 others); Thu, 16 Nov 2023 19:12:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjKQAM1 (ORCPT ); Thu, 16 Nov 2023 19:12:27 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2062.outbound.protection.outlook.com [40.107.237.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69C07EA; Thu, 16 Nov 2023 16:12:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nH2Pye8xEh+Iyux2PmC1jste1S7LNOxUhuD37DDjuHOT93qK+qNFup9Gw3oXU817UrJspX9sA0e1zhEUuYRw1IAfAmy2cV6qH40m+mzxCNtWW7Tzop8ajtXGjtRYnOVw/OzotAm4K1GlQH+g9JJEi5pXNoLzyNed7l75khAGWV8mK8wpYwt3OPVXahce3KSIBI6PCwDW9IxDaaafnlLsL3gtRFPqbru6peSOuDgkn2akbD7P2SdmdBny9rvWIWWJt3aiNVBnr+3UFAvmt6M5WwV2kwA05n5HlFcQj0kOdOFJZgr21tkPt5/OczWwpI7KhXTMIiIJX1gwJ2M1/xZhcQ== 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=JTyoY2i8Xx9g2b+pqJcCalArIA38GvHGlgllY/9ujog=; b=C5FjB/PCFRBTBiHgTOkwyQU06oBmkJMduWiI3orE/8aBmKiylJtuGJPK8kqNEoVpZ/NKjnRopzBaDjYwuSrgKcrlttMgCjKzF6lC9QVhOSyptzPW0jKog3jQtimczCcQ2oIeZt8VNxs6msMdScupjeX2E3VBo5omt2Vb7tHn6uUhkKLzs/mRsoAmrpRkXYwCXw/9VdNPFaEtiGrpDGEJe+TGZrL4RSK6npx82SHwGwKPVd9umpjQ5Dz9XyBiyajn7v9L92Xtw3eVmO4IUUir8YDFHjrNo83XgEcdgs1eyNJJ3L9MRbm78rKxs5vyRAwJreevXgbi6JjAilmWApTz+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ziepe.ca smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JTyoY2i8Xx9g2b+pqJcCalArIA38GvHGlgllY/9ujog=; b=zE2hymqtPI4fYel4xmaGn7qlqp77ymB4MAzbMaT3L9TNGIPKjC7PeZmCOXv6oe6SzLcPxoyBH+lobXJYlSMqJxa3g25AN4PU/WqsTEkueUGwdLwx7xO07hhnauLRIFTEEdtF2BK5IbH/ByZy+CqrzxAdcRfHgtJgxv9nie0RfWw= Received: from PA7P264CA0056.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:34a::8) by DS0PR12MB6560.namprd12.prod.outlook.com (2603:10b6:8:d0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Fri, 17 Nov 2023 00:12:21 +0000 Received: from SN1PEPF0002BA4D.namprd03.prod.outlook.com (2603:10a6:102:34a:cafe::d4) by PA7P264CA0056.outlook.office365.com (2603:10a6:102:34a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23 via Frontend Transport; Fri, 17 Nov 2023 00:12:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA4D.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7002.20 via Frontend Transport; Fri, 17 Nov 2023 00:12:20 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 16 Nov 2023 18:12:18 -0600 From: Brett Creeley To: , , , , , , CC: , Subject: [PATCH v2 vfio 0/6] vfio/pds: Clean-ups and multi-region support Date: Thu, 16 Nov 2023 16:12:01 -0800 Message-ID: <20231117001207.2793-1-brett.creeley@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4D:EE_|DS0PR12MB6560:EE_ X-MS-Office365-Filtering-Correlation-Id: f3a163a8-d3f6-4c54-1847-08dbe701ddf3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VfUiDLt+qGs0FYK3vqH4Ss11FqrNVxz72chBzuArSH2X1a80iggemPz/6QoiJENMn3J3aEJAmm/62x7+XpAgC1IaPAsqaL0Hs3vHo6Mu5XBFCnEC+6VYO48I9+M2IEEal+rQD3p9kOfXleE8yhD6q809XwejA+ZpKjbR0S6lFXFEpnPnjRkvwq04UPOw2Va0KlZjtZXoFTEj2b4wdrjz1b2DcZv7aKCmg0BSo2Fv/G+ciN4orW4wHpDShgESltJxE3LQp1RzGAnyLm+q/U2d8S3V2Xx4n2M7uDykz7Y3YfgnppB5bk+AHpa+2Q/+P3yRNHxnFyDp3fox9I2w1NJKEbagZnyQ7tqdNpQDPpJfBpg2TatA6MbmVydWkGsZn375OKwgZSu+kftpOFFu23Uz9LlPHfMxLGibam/d2nYWeSPpyq4VHN5aWO6ducNxwhMaqP9CNWMtjWFnGErLXFOGnkwpRwX/0choZ9MPv0KUCr+rzKzQteUavVwBdTDHAoBa8EwoaRBg7g4m46oGaws4rUVJCh8BvsGtienXTi1ZCSM3bkZOhyxxwU6PmnUgDxxQfjnsTu92rsWA+9f0KLmH5GXVTyBcMlJb7pCqgmd7VTrKSXuEPEyF+QtEF5iik6g2PwKylPlWoqLSSn7oc5nXl3mnkTmwU0OEOU1r+Aws0rwvx47C/jNoupLtUacVnaCYsSNN0kcb9/2gbUzquLeUiipdScnIdvJGORJEVtHWkuASo81OFisgSz9RhEXlBTGl X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(136003)(396003)(39860400002)(376002)(230922051799003)(186009)(82310400011)(1800799009)(64100799003)(451199024)(36840700001)(40470700004)(46966006)(36860700001)(81166007)(47076005)(356005)(83380400001)(82740400003)(426003)(336012)(1076003)(36756003)(26005)(16526019)(2616005)(6666004)(40480700001)(478600001)(966005)(86362001)(5660300002)(4326008)(70586007)(70206006)(110136005)(41300700001)(54906003)(316002)(8936002)(8676002)(40460700003)(44832011)(2906002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 00:12:20.7268 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3a163a8-d3f6-4c54-1847-08dbe701ddf3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6560 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 16 Nov 2023 16:12:44 -0800 (PST) This series contains various clean-ups, improvements, and support for multiple dirty tracking regions. The majority of clean-up and improvements are in preparation for the last patch in the series, which adds support for multiple dirty tracking regions. Changes: v2: - Make use of BITS_PER_BYTE #define - Use C99 style for loops - Fix subject line to use vfio/pds instead of pds-vfio-pci - Separate out some calculation fixes into another patch so it can be backported to 6.6-stable - Fix bounds check in pds_vfio_get_region() v1: https://lore.kernel.org/kvm/20231114210129.34318-1-brett.creeley@amd.com/T/ Brett Creeley (6): vfio/pds: Fix calculations in pds_vfio_dirty_sync vfio/pds: Only use a single SGL for both seq and ack vfio/pds: Move and rename region specific info vfio/pds: Pass region info to relevant functions vfio/pds: Move seq/ack bitmaps into region struct vfio/pds: Add multi-region support drivers/vfio/pci/pds/dirty.c | 309 ++++++++++++++++++++++------------- drivers/vfio/pci/pds/dirty.h | 18 +- 2 files changed, 204 insertions(+), 123 deletions(-) -- 2.17.1