[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250430021135.2370244-1-baolu.lu@linux.intel.com>
Date: Wed, 30 Apr 2025 10:11:33 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Jason Gunthorpe <jgg@...pe.ca>,
Kevin Tian <kevin.tian@...el.com>
Cc: iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Lu Baolu <baolu.lu@...ux.intel.com>
Subject: [PATCH v2 0/2] iommu/vt-d: Use ida for domain ID management
This converts the Intel iommu driver's domain ID management from a
fixed-size bitmap to the dynamic ida allocator. This improves memory
efficiency by only allocating resources for the domain IDs actually in
use, rather than the maximum possible number.
The also includes necessary cleanups after the ida conversion, including
locking adjustment for the ida.
---
Change log:
v2:
- Drop the last patch which simplified the code with __free(). There
needs a helper like xa_store_or_{reset,kfree}(). Thus I plan to put
it a separated series with broader reviewers.
v1: https://lore.kernel.org/linux-iommu/20250423031020.2189546-1-baolu.lu@linux.intel.com/
Lu Baolu (2):
iommu/vt-d: Use ida to manage domain id
iommu/vt-d: Replace spin_lock with mutex to protect domain ida
drivers/iommu/intel/dmar.c | 4 ++
drivers/iommu/intel/iommu.c | 90 ++++++++-----------------------------
drivers/iommu/intel/iommu.h | 21 +++++++--
3 files changed, 40 insertions(+), 75 deletions(-)
--
2.43.0
Powered by blists - more mailing lists