From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796423250; b=J+k8Too/8GBwEOeF3v8zlgm5xhMeYF4aDDNJsdFMMrqZ7sAnUNrwMJzyVnv9tLMurkAH gTpHH1HdHu/N4sTGci1zKcobzDF3XMft0J2Rfy10MMkZZ+ne7nYeNX/m5vOtOnGwE2RtX fo/qjatiWpABLc4C/hJqtssyo1B/9r6cRdHV5WrRADlEARc+xeguJ4UTxrkzS1KFx692L OvX7LbTc/yugyQs2uVjQvvU6KlOrj9lSnzPgsS2r8Hf4bDrN/3yrKlX9z3eHYE/Qpe8QN ejB9qOzSvv+/RsW3zUkhrYv53D1WtUo2qF6QzOTP8wfsNL+P8vFtlhfgnIAlwDQEYlQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796423250; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=HbetmiTA9VYlKaKXNgGTNAbJqTN9ERZ0U5egC9oqVFc=; b=lf8Ix47c2qy77/jaX/TbIy1qJyfFzhyScKZ2tZxvYaVMtiNh1TnhPAQxFWC4M2YoIhut kQT95Sgfau22mFglxkycpdXRreOzZdDVC7NedH6o6aNLjUAtujG/U2laqlJ6w41Q6krWd TULWpddhWmR1vcSxn6eMDu/GPlihUlQ3CAZ5WZjonDbOHFWWj2kU/7jKGrnwQNhUJotQ0 sFGEeF/a/Y68gxvL9GuSC8khk69jiyCmXcpe/lYZYgsSgdh7DL6QoN8yU6vFEswFM/wND 1+e2YZS8h5c2hsQGWWpLKSXwwb2x0Y8ftW3mrB2FN0NcQpLEmheuHALvVjQuaDXbljQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b="VX4YtUt/"; arc=none smtp.remote-ip=209.85.214.172 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20362606A32F for ; Fri, 4 Dec 2026 22:27:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 20362606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=VX4YtUt/ Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2f146d5607aso18715ad.0 for ; Fri, 04 Dec 2026 14:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796423249; x=1797028049; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=HbetmiTA9VYlKaKXNgGTNAbJqTN9ERZ0U5egC9oqVFc=; b=VX4YtUt/jwGnInbsWaNCRe0Jo0jVBQtlo8+UXLesjKx6hOEwXog8xrFPYcZ/QKun4L 9PANZsmaS4k9hC2xPqPKz5MnvMaTpRLmYlnTvwbsmyK6VbgzKoWnHTdKXJrTNpC7Jt0q r3gTywZbcZvMzGBmuACOb8pDmqZvbe9M6zK8RIy8yO08vt9BC8Dr1BuS3vL2BWbdsaaW plxcXV2OKRWgwqDk1jUNBkUAmo0TfYfFov2z0NtbEXwVQwrX8iXCwR9jgegquD7OP/5u 9Auj6imYhqJTPeuq7+fuvGCCqAH2qqq28vtg0Iz3gKdvVF52Jmu68h5zwRD7Y2lgNCBI s96w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796423249; x=1797028049; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HbetmiTA9VYlKaKXNgGTNAbJqTN9ERZ0U5egC9oqVFc=; b=P/iP4jy/VzUQpaZ9AHpiGz3tzRytoqy2Nv5MuWxtTX6SzJtwUEO8VmVt5yg5/sjxEb rdjhkVH7DXSSmzXVqyjArDFQotiUoLfJshoEwhKi6JxgmlPPnCYcYuhSJ7HFp2KxWp30 Wj1NGMGDsl+tZa+8RWMJLvTIz7xyCsp6WNBq5jGB0nrp4eEj5cfL//Cyn/v/cckEyHzV s13TDEXCQR6gN+tR2rvdcG1tIoZe6RLU/2Pc9brO7nWGiiw9K/KxNQPDb7MBs3ulwgIF 7hb3tlDzVSTn8xNWUfpEHOpO+HTphDsC3LCEHgPBMU6hyaevE6TY36mD9vUARZbSNvb/ XaDA== X-Forwarded-Encrypted: i=1; AL+hErGT5mYhts5vic1TdH8H8blTqQAUBlFmQBYtvXS13kVJ1m5a2JA//P5NMnQ/wtY8ji+B5bNnLQ==@lists.linux.dev X-Gm-Message-State: AB4q+uEbk/Rlix9i7d12noXFL9FFTioOpF8L1lkZ6ski8akU1lVZ7Q6b H49Uc19fjLhpaI8o10ANVa5DyNdGLugzEwZiRX15Gx2dC5q52VZHuzXB5X+NPcSITFnqHS/mdO2 3vN0ZGw== X-Gm-Gg: AZFdTZdc7Ev3u5WYH7u4Wg4eCkpU/u7afV7qa6Vn7EpQYX6t6mVLK28CzGJJo0F7VXm 5nAdiJQ5rM2O4vAiFp/oUR4bNtHMX2x3jxEYf63YiLghKWfHUye/PYLVSf1MXvs/vusYTf6J3Lr aEuqippzKxaCtfd1UEQdd2mNpi/ngjHjdyhBHs4o2pnGj4pvDngVqJ+clh1qCs/Q5bswwufK/9w bfjFDKAs3UsQZRUK/UImzv0XYuDO664rps9/RJpO0i9y5anMRpM9NYtuNAYNRImEzgekaj7uq0U CDjFBmfjtuBOYj/1VUIrSMtn/Dml/CcK4MinA6hNiiMWLWlWRoRnv07MlnJpuEkFUJbgr5bjbs2 vJ2AVGsfGCS/DCcORyP9SjH1ywHnWl3jclKSlNllkuU8T3kEX1B0MyLbRGU1cCt9Ys+Y5T2zloc WXVpECzmJ1ALs7HYUw5fxcHZZC1vByxtlM4lrPazBRQ0C0DoMqs96zL1IhZlZO4iG5J3qYhaxrt zXjgWZGqA8tEN64rwyP5m3EqDIPfvL3e26RaL5O0YyuV+20RiRNN1Rkk+ipvKe7gWi1rXBzxYrd FoKajgop1l2mtfWzB3dpke9IauKdlc0UYcyVY09ZVHrqyooGDTCgk8FqfppoCachtZK2obAlw3V fsUhFKBHWhxWSlcMOHwoz0g== X-Received: by 2002:a17:903:3ba5:b0:2f1:b893:6697 with SMTP id d9443c01a7336-2f1f4d3e7b5mr303115ad.22.1796423248678; Fri, 04 Dec 2026 14:27:28 -0800 (PST) Received: from google.com (25.75.145.34.bc.googleusercontent.com. [34.145.75.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5ddb881b3sm5900746a91.2.2026.12.04.14.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 14:27:27 -0800 (PST) Date: Fri, 4 Dec 2026 22:27:25 +0000 From: Samiullah Khawaja To: Baolu Lu Cc: Joerg Roedel , Will Deacon , Jason Gunthorpe , David Woodhouse , Robin Murphy , Kevin Tian , Alex Williamson , Shuah Khan , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Pratyush Yadav , Pasha Tatashin , David Matlack , Andrew Morton , Pranjal Shrivastava , Vipin Sharma , Ankit Soni , Nicolin Chen , John Starks Subject: Re: [PATCH v8 14/18] iommu/vt-d: Handle reattach of the restored domain Message-ID: References: <20261123044949.3610702-1-skhawaja@google.com> <20261123044949.3610702-15-skhawaja@google.com> <7465e210-295a-431e-8621-9a93b22c0a24@linux.intel.com> X-Mailing-List: iommu@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <7465e210-295a-431e-8621-9a93b22c0a24@linux.intel.com> On Fri, Dec 04, 2026 at 03:33:17PM +0800, Baolu Lu wrote: >On 11/23/26 12:49, Samiullah Khawaja wrote: >>Reattach the restored domain to the preserved device using restored >>domain ID. While reattaching do not setup the context and PASID entries >>as those are preserved during liveupdate. >> >>Note that in this phase nothing clears IOMMU_SER_FLAG_INCOMING of the >>restored domain or the restored state of the device, so the restored >>domain cannot be replaced yet. Replacing it is left to a later phase. >> >>Signed-off-by: Samiullah Khawaja >>--- >> drivers/iommu/intel/iommu.c | 36 ++++++- >> drivers/iommu/intel/iommu.h | 20 ++++ >> drivers/iommu/intel/liveupdate.c | 170 +++++++++++++++++++++++++++++++ >> 3 files changed, 224 insertions(+), 2 deletions(-) >> >>diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c >>index a487b6ca0415..3b31d0962e33 100644 >>--- a/drivers/iommu/intel/iommu.c >>+++ b/drivers/iommu/intel/iommu.c >>@@ -3174,6 +3174,25 @@ intel_iommu_domain_alloc_second_stage(struct device *dev, >> return &dmar_domain->domain; >> } >>+/* >>+ * A restored device translates through the preserved page table, so use the >>+ * stage of its preserved RID_PASID entry. The stage allocators reject flags >>+ * that the stage doesn't support. >>+ */ >>+static struct iommu_domain * >>+intel_iommu_domain_alloc_restored(struct device *dev, struct intel_iommu *iommu, >>+ u32 flags) >>+{ >>+ switch (intel_iommu_restored_pgtt(dev)) { >>+ case PASID_ENTRY_PGTT_FL_ONLY: >>+ return intel_iommu_domain_alloc_first_stage(dev, iommu, flags); >>+ case PASID_ENTRY_PGTT_SL_ONLY: >>+ return intel_iommu_domain_alloc_second_stage(dev, iommu, flags); >>+ default: >>+ return ERR_PTR(-EINVAL); >>+ } >>+} >>+ >> static struct iommu_domain * >> intel_iommu_domain_alloc_paging_flags(struct device *dev, u32 flags, >> const struct iommu_user_data *user_data) >>@@ -3185,6 +3204,9 @@ intel_iommu_domain_alloc_paging_flags(struct device *dev, u32 flags, >> if (user_data) >> return ERR_PTR(-EOPNOTSUPP); >>+ if (dev_iommu_restored_state(dev)) >>+ return intel_iommu_domain_alloc_restored(dev, iommu, flags); > >Hmm, this check is based on the device's state, not on the caller's >intent. Could the restore path in iommu core tell the driver explicitly >(through a @flags bit) that it is allocating the restored domain? Add a >attribute for this domain, ... Yes, that is more deterministic. I will add a flag for this and use it here. > >>+ >> /* Prefer first stage if possible by default. */ >> domain = intel_iommu_domain_alloc_first_stage(dev, iommu, flags); >> if (domain != ERR_PTR(-EOPNOTSUPP)) >>@@ -3325,6 +3347,9 @@ static int intel_iommu_attach_device(struct iommu_domain *domain, >> { >> int ret; >>+ if (dev_iommu_restored_state(dev)) >>+ return intel_iommu_attach_restored_device(domain, dev); > >... and, here check the domain attribute instead. We still need to check here that the device is a restored device when taking the attach_restored_device() path. I will also check that the domain is a restored domain here. > >>+ >> device_block_translation(dev); >> ret = paging_domain_compatible(domain, dev); >>@@ -3568,16 +3593,23 @@ static void intel_iommu_release_device(struct device *dev) >> info->pasid_enabled = 0; >> } >>+ if (dev_iommu_restored_state(dev)) >>+ intel_iommu_detach_restored_device(dev); >> +> mutex_lock(&iommu->iopf_lock); >> if (dev_is_pci(dev) && pci_ats_supported(to_pci_dev(dev))) >> device_rbtree_remove(info); >> mutex_unlock(&iommu->iopf_lock); >>- if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev) && >>+ if (!dev_iommu_restored_state(dev) && sm_supported(iommu) && >>+ !dev_is_real_dma_subdevice(dev) && >> !context_copied(iommu, info->bus, info->devfn)) >> intel_pasid_teardown_sm_context(dev); >>- intel_pasid_free_table(dev); >>+ if (!dev_iommu_restored_state(dev)) >>+ intel_pasid_free_table(dev); >>+ else >>+ kfree(info->pasid_table); > >Nit: dev_iommu_restored_state() is now evaluated three times in this >function. Read it once into a local variable? Agreed. Will update. > >> intel_iommu_debugfs_remove_dev(info); >> kfree(info); >> } >>diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h >>index 633747672c22..7e397eed391a 100644 >>--- a/drivers/iommu/intel/iommu.h >>+++ b/drivers/iommu/intel/iommu.h >>@@ -1322,6 +1322,10 @@ void intel_iommu_shutdown_preserved(struct dmar_drhd_unit *drhd); >> void intel_iommu_liveupdate_restore_root_table(struct intel_iommu *iommu, >> struct iommu_hw_ser *iommu_ser); >> void intel_iommu_handle_drhd_restore_failure(struct intel_iommu *iommu); >>+int intel_iommu_attach_restored_device(struct iommu_domain *domain, >>+ struct device *dev); >>+int intel_iommu_detach_restored_device(struct device *dev); >>+u16 intel_iommu_restored_pgtt(struct device *dev); >> #else >> static inline void intel_iommu_shutdown_preserved(struct dmar_drhd_unit *drhd) >> { >>@@ -1335,6 +1339,22 @@ static inline void intel_iommu_liveupdate_restore_root_table(struct intel_iommu >> static inline void intel_iommu_handle_drhd_restore_failure(struct intel_iommu *iommu) >> { >> } >>+ >>+static inline int intel_iommu_attach_restored_device(struct iommu_domain *domain, >>+ struct device *dev) >>+{ >>+ return -EOPNOTSUPP; >>+} >>+ >>+static inline int intel_iommu_detach_restored_device(struct device *dev) >>+{ >>+ return -EOPNOTSUPP; >>+} >>+ >>+static inline u16 intel_iommu_restored_pgtt(struct device *dev) >>+{ >>+ return 0; >>+} >> #endif >> #ifdef CONFIG_INTEL_IOMMU_SVM >>diff --git a/drivers/iommu/intel/liveupdate.c b/drivers/iommu/intel/liveupdate.c >>index 34651698b8e9..f907e52576e5 100644 >>--- a/drivers/iommu/intel/liveupdate.c >>+++ b/drivers/iommu/intel/liveupdate.c >>@@ -444,6 +444,176 @@ void intel_iommu_handle_drhd_restore_failure(struct intel_iommu *iommu) >> iommu->name); >> } >>+static void domain_detach_restored_iommu(struct dmar_domain *domain, >>+ struct intel_iommu *iommu) >>+{ >>+ struct iommu_domain_info *info; >>+ >>+ /* >>+ * Unlike domain_detach_iommu(), the restored domain ID is not freed >>+ * here. A restored device can be removed and probed again while its >>+ * preserved context and PASID entries still use this domain ID, so it >>+ * stays reserved. Once iommufd reclaims the restored domain, the >>+ * normal detach path frees it. >>+ */ >>+ guard(mutex)(&iommu->did_lock); >>+ info = xa_load(&domain->iommu_array, iommu->seq_id); >>+ if (--info->refcnt == 0) { >>+ xa_erase(&domain->iommu_array, iommu->seq_id); >>+ kfree(info); >>+ } >>+} >>+ >>+static int domain_attach_restored_iommu(struct dmar_domain *domain, >>+ struct intel_iommu *iommu, >>+ struct iommu_device_ser *device_ser) >>+{ >>+ struct iommu_domain_info *info, *curr; >>+ struct iommu_domain_ser *domain_ser; >>+ struct iommu_hw_ser *iommu_hw_ser; >>+ int restored_did; >>+ int ret; >>+ >>+ if (!iommu_domain_restored_state(&domain->domain)) >>+ return -EINVAL; >>+ >>+ if (!device_ser->attachment.domain_phys || >>+ !device_ser->iommu_phys) >>+ return -EINVAL; >>+ >>+ domain_ser = phys_to_virt(device_ser->attachment.domain_phys); >>+ if (domain_ser->restored_domain != &domain->domain) >>+ return -EINVAL; >>+ >>+ iommu_hw_ser = phys_to_virt(device_ser->iommu_phys); >>+ if (iommu_hw_ser->type != IOMMU_SER_TYPE_INTEL || >>+ iommu_hw_ser->intel.phys_addr != iommu->reg_phys) >>+ return -EINVAL; >>+ >>+ restored_did = device_ser->attachment.attachment_id; >>+ if (!ida_exists(&iommu->domain_ida, restored_did)) >>+ return -EINVAL; >>+ >>+ info = kzalloc_obj(*info); >>+ if (!info) >>+ return -ENOMEM; >>+ >>+ guard(mutex)(&iommu->did_lock); >>+ curr = xa_load(&domain->iommu_array, iommu->seq_id); >>+ if (curr) { >>+ kfree(info); >>+ if (WARN_ON(curr->did != restored_did)) >>+ return -EINVAL; >>+ >>+ curr->refcnt++; >>+ return 0; >>+ } >>+ >>+ info->refcnt = 1; >>+ info->did = restored_did; >>+ info->iommu = iommu; >>+ curr = xa_cmpxchg(&domain->iommu_array, iommu->seq_id, >>+ NULL, info, GFP_KERNEL); >>+ if (curr) { >>+ ret = xa_err(curr) ? : -EBUSY; >>+ goto err_unlock; >>+ } >>+ >>+ return 0; >>+ >>+err_unlock: >>+ kfree(info); >>+ return ret; > >nit: cleanup.h asks no mix of goto-type unwind and guard(). Just kfree() >and return inline. This was also pointed out by sashiko, but I kept it as is since it is done this way in the intel/iommu.c file in domain_attach_iommu(). I will update this. I can send out a separate patch to update iommu.c file also for consistency. > >>+} >>+ >>+/** >>+ * intel_iommu_attach_restored_device() - Restore device domain attachment after live update >>+ * @domain: Restored domain >>+ * @dev: Restored device >>+ * >>+ * Return: 0 on success, or negative error code. >>+ */ >>+int intel_iommu_attach_restored_device(struct iommu_domain *domain, >>+ struct device *dev) >>+{ >>+ struct iommu_device_ser *device_ser = dev_iommu_restored_state(dev); >>+ struct device_domain_info *info = dev_iommu_priv_get(dev); >>+ struct dmar_domain *dmar_domain = to_dmar_domain(domain); >>+ struct intel_iommu *iommu = info->iommu; >>+ unsigned long flags; >>+ int ret; >>+ >>+ if (!device_ser) >>+ return -EINVAL; >>+ >>+ ret = domain_attach_restored_iommu(dmar_domain, iommu, device_ser); >>+ if (ret) >>+ return ret; >>+ >>+ info->domain = dmar_domain; >>+ info->domain_attached = true; >>+ spin_lock_irqsave(&dmar_domain->lock, flags); >>+ list_add(&info->link, &dmar_domain->devices); >>+ spin_unlock_irqrestore(&dmar_domain->lock, flags); >>+ >>+ return 0; >>+} >>+ >>+int intel_iommu_detach_restored_device(struct device *dev) >>+{ >>+ struct device_domain_info *info = dev_iommu_priv_get(dev); >>+ struct intel_iommu *iommu = info->iommu; >>+ struct iommu_domain *domain; >>+ unsigned long flags; >>+ >>+ if (!info->domain_attached || !info->domain) >>+ return -EINVAL; >>+ >>+ domain = &info->domain->domain; >>+ if (!iommu_domain_restored_state(domain)) >>+ return -EINVAL; >>+ >>+ info->domain_attached = false; >>+ >>+ spin_lock_irqsave(&info->domain->lock, flags); >>+ list_del(&info->link); >>+ spin_unlock_irqrestore(&info->domain->lock, flags); >>+ >>+ domain_detach_restored_iommu(info->domain, iommu); >>+ info->domain = NULL; >>+ >>+ return 0; >>+} >>+ >>+/** >>+ * intel_iommu_restored_pgtt() - Get the translation type of a restored device >>+ * @dev: Restored device >>+ * >>+ * Return: PGTT of the preserved RID_PASID entry of @dev, or 0 if the entry is >>+ * not present. Without a preserved PASID table the IOMMU is in legacy mode, >>+ * which only supports second stage, so PASID_ENTRY_PGTT_SL_ONLY is returned. >>+ */ >>+u16 intel_iommu_restored_pgtt(struct device *dev) >>+{ >>+ struct iommu_device_ser *ser = dev_iommu_restored_state(dev); >>+ struct pasid_entry *table, *pte; >>+ struct pasid_dir_entry *dir; >>+ >>+ if (!ser->intel.pasid_table) >>+ return PASID_ENTRY_PGTT_SL_ONLY; > >Legacy vs. scalable mode should be decided with sm_supported(iommu), not >by whether a PASID table was preserved. In scalable mode, a restored >device without a preserved PASID table is an error, but here it is >silently treated as second stage. Agreed. The sm_supported(iommu) and pasid_table preservation is already checked early during restore to sanity check that the configuration of the new kernel matches with the previous kernel. Here we can check sm_supported(iommu) again to use second stage. > >The PASID table has already been restored into info->pasid_table in >intel_iommu_probe_device(). It's simpler to look up the RID_PASID entry >through that instead of parsing the serialized physical address again. This sounds good to me. I will update this. > >>+ >>+ dir = phys_to_virt(ser->intel.pasid_table); >>+ table = get_pasid_table_from_pde(&dir[IOMMU_NO_PASID >> PASID_PDE_SHIFT]); >>+ if (!table) >>+ return 0; >>+ >>+ pte = &table[IOMMU_NO_PASID & PASID_PTE_MASK]; >>+ if (!pasid_pte_is_present(pte)) >>+ return 0; >>+ >>+ return pasid_pte_get_pgtt(pte); >>+} >>+ >> enum pasid_lu_op { >> PASID_LU_OP_PRESERVE = 1, >> PASID_LU_OP_UNPRESERVE, > >Thanks, >baolu > Thanks, Sami