On 2023/12/28 14:14, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Thursday, December 28, 2023 12:14 AM
+ /* Negative test: trigger error */
+ num_inv = 1;
+ inv_reqs[0].flags =
IOMMU_TEST_INVALIDATE_FLAG_TRIGGER_ERROR;
+ inv_reqs[0].iotlb_id =
On 2023/12/28 14:17, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Thursday, December 28, 2023 12:14 AM
@@ -1376,6 +1383,8 @@ int qi_submit_sync(struct intel_iommu *iommu,
struct qi_desc *desc,
restart:
rc = 0;
+ if (fault)
+ *fault = 0;
move it to right before the l
On 2023/12/28 14:38, Tian, Kevin wrote:
From: Tian, Kevin
Sent: Thursday, December 28, 2023 2:38 PM
From: Liu, Yi L
Sent: Thursday, December 28, 2023 12:14 AM
+/**
+ * struct iommu_hwpt_vtd_s1_invalidate - Intel VT-d cache invalidation
+ * (IOMMU_HWPT_INVA
On 2023/12/28 15:11, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Thursday, December 28, 2023 12:14 AM
+static void nested_flush_pasid_iotlb(struct intel_iommu *iommu,
+struct dmar_domain *domain, u64 addr,
+unsigned long npag
From: Lu Baolu
The updates of the PTEs in the nested page table will be propagated to the
hardware caches.
Add a new domain op cache_invalidate_user for the userspace to flush the
hardware caches for a nested domain through iommufd. No wrapper for it,
as it's only supposed to be used by iommufd.
Nested translation is a hardware feature that is supported by many modern
IOMMU hardwares. It has two stages (stage-1, stage-2) address translation
to get access to the physical address. stage-1 translation table is owned
by userspace (e.g. by a guest OS), while stage-2 is owned by kernel. Changes
In nested translation, the stage-1 page table is user-managed but cached
by the IOMMU hardware, so an update on present page table entries in the
stage-1 page table should be followed with a cache invalidation.
Add an IOMMU_HWPT_INVALIDATE ioctl to support such a cache invalidation.
It takes hwpt_
From: Nicolin Chen
Wrap up the data pointer/num sanity and __iommu_copy_struct_from_user
call for iommu drivers to copy driver specific data at a specific location
in the struct iommu_user_data_array, and iommu_respond_struct_to_user_array()
to copy response to a specific location in the struct i
From: Nicolin Chen
Add mock_domain_cache_invalidate_user() data structure to support user
space selftest program to cover user cache invalidation pathway.
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
Co-developed-by: Yi Liu
Signed-off-by: Yi Liu
---
drivers/iommu/iommufd/iommufd_test
From: Nicolin Chen
Add test cases for the IOMMU_HWPT_INVALIDATE ioctl and verify it by using
the new IOMMU_TEST_OP_MD_CHECK_IOTLB.
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
Co-developed-by: Yi Liu
Signed-off-by: Yi Liu
---
tools/testing/selftests/iommu/iommufd.c | 186 ++
From: Nicolin Chen
Allow to test whether IOTLB has been invalidated or not.
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
Signed-off-by: Yi Liu
---
drivers/iommu/iommufd/iommufd_test.h | 5
drivers/iommu/iommufd/selftest.c | 26 +++
tools/tes
From: Lu Baolu
This allows qi_submit_sync() to return back faults to callers.
Signed-off-by: Lu Baolu
Signed-off-by: Yi Liu
---
drivers/iommu/intel/dmar.c | 42 -
drivers/iommu/intel/iommu.h | 2 +-
drivers/iommu/intel/irq_remapping.c | 2 +-
dri
From: Lu Baolu
This makes the pasid based cache invalidation and device TLB invalidation
to return QI faults to callers. This is needed when usersapce invalidates
cache after modifying the stage-1 page table used in nested translation.
Hardware errors during invalidation should be reported to use
This adds the data structure invalidating caches for the nested domain
allocated with IOMMU_HWPT_DATA_VTD_S1 type.
Reviewed-by: Kevin Tian
Signed-off-by: Lu Baolu
Signed-off-by: Yi Liu
---
include/uapi/linux/iommufd.h | 58
1 file changed, 58 insertions(+)
From: Lu Baolu
This implements the .cache_invalidate_user() callback to support iotlb
flush for nested domain.
Signed-off-by: Lu Baolu
Co-developed-by: Yi Liu
Signed-off-by: Yi Liu
---
drivers/iommu/intel/nested.c | 107 +++
1 file changed, 107 insertions(+)
Willem de Bruijn wrote:
> Richard Gobert wrote:
>> This commit utilizes a new helper function, ipv6_gro_pull_exthdrs, which
>> is used in ipv6_gro_receive to pull ipv6 ext headers instead of
>> ipv6_gso_pull_exthdrs. To use ipv6_gso_pull_exthdr, pskb_pull and
>> __skb_push must be used, and frag
Willem de Bruijn wrote:
> Richard Gobert wrote:
>> Currently there is no test which checks that IPv6 extension header packets
>> successfully coalesce. This commit adds a test, which verifies two IPv6
>> packets with HBH extension headers do coalesce.
>>
>> I changed the receive socket filter to
I have no opinion about the patches themselves, but just a heads-up
that "busses" may be regarded as a misspelling of "buses", e.g.,
https://lore.kernel.org/r/20231223184720.25645-1-tintinm2...@gmail.com,
I'm guessing because codespell complains about it.
Git grep says there are almost as many ins
> From: Liu, Yi L
> Sent: Thursday, December 28, 2023 11:06 PM
>
> From: Lu Baolu
>
> This allows qi_submit_sync() to return back faults to callers.
this might be useful to add a note that the retry logic itself is being
discussed
in a separate thread [1]. Here we keep it intact and just make
> From: Liu, Yi L
> Sent: Thursday, December 28, 2023 11:06 PM
>
> From: Lu Baolu
>
> This implements the .cache_invalidate_user() callback to support iotlb
> flush for nested domain.
>
> Signed-off-by: Lu Baolu
> Co-developed-by: Yi Liu
> Signed-off-by: Yi Liu
Reviewed-by: Kevin Tian
> From: Liu, Yi L
> Sent: Thursday, December 28, 2023 11:06 PM
>
> This series is based on the first part which was merged [1], this series is to
> add the cache invalidation interface or the userspace to invalidate cache
> after
> modifying the stage-1 page table. This includes both the iommufd
On 2023/12/29 10:52, Tian, Kevin wrote:
From: Liu, Yi L
Sent: Thursday, December 28, 2023 11:06 PM
From: Lu Baolu
This allows qi_submit_sync() to return back faults to callers.
this might be useful to add a note that the retry logic itself is being
discussed
in a separate thread [1]. Here
22 matches
Mail list logo