> 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 npages, bool ih)
> +{
> + u16 di
> 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_INVALIDATE_DATA_
> 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_INVALIDATE_DATA_VTD_S1)
> + * @addr: The start address of the range to be invalidated. It needs to
> From: Liu, Yi L
> Sent: Thursday, December 28, 2023 12:14 AM
>
> 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 nest
> 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 loop of qi_check_fault()
>
>
> 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 = 0;
> + test_cmd_hwpt_
> From: Liu, Yi L
> Sent: Thursday, December 28, 2023 12:14 AM
>
> 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 IOM
> From: Liu, Yi L
> Sent: Wednesday, December 27, 2023 10:13 PM
>
> On 2023/12/27 17:33, Ethan Zhao wrote:
> >
> > On 12/27/2023 5:06 PM, Duan, Zhenzhong wrote:
> >>
> >>> -Original Message-
> >>> From: Liu, Yi L
> >>> Sent: Tuesday, December 26, 2023 4:44 PM
> >>> Subject: Re: [PATCH v7
On 2023/12/28 04:58, Nicolin Chen wrote:
On Wed, Dec 27, 2023 at 08:13:44AM -0800, Yi Liu wrote:
[2] https://github.com/yiliu1765/iommufd/tree/iommufd_nesting
This branch is still pointing to v7's iommufd_nesting-12212023-yi.
Likely you should update it to v8's iommufd_nesting-12272023-yi :
[AMD Official Use Only - General]
Hi Raphael:
> -Original Message-
> From: Rafael J. Wysocki
> Sent: Thursday, December 28, 2023 1:04 AM
> To: Meng, Li (Jassmine)
> Cc: Rafael J. Wysocki ; Rafael J . Wysocki
> ; Huang, Ray ; linux-
> p...@vger.kernel.org; linux-ker...@vger.kernel.org; x
On Wed, Dec 27, 2023 at 08:13:44AM -0800, Yi Liu wrote:
> [2] https://github.com/yiliu1765/iommufd/tree/iommufd_nesting
This branch is still pointing to v7's iommufd_nesting-12212023-yi.
Likely you should update it to v8's iommufd_nesting-12272023-yi :)
Thanks
Nic
On 12/27/2023 11:52 AM, Mimi Zohar wrote:
> On Tue, 2023-12-26 at 12:14 -0800, Casey Schaufler wrote:
>> On 12/26/2023 10:14 AM, Mimi Zohar wrote:
>>> On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote:
From: Roberto Sassu
Move hardcoded IMA function calls (not appraisal-specifi
On Tue, 2023-12-26 at 12:14 -0800, Casey Schaufler wrote:
> On 12/26/2023 10:14 AM, Mimi Zohar wrote:
> > On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote:
> >> From: Roberto Sassu
> >>
> >> Move hardcoded IMA function calls (not appraisal-specific functions) from
> >> various places in the
On Wed, 2023-12-27 at 17:39 +0100, Roberto Sassu wrote:
> On 12/27/2023 2:22 PM, Mimi Zohar wrote:
> > On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote:
> >> From: Roberto Sassu
> >>
> >> Make the 'ima' LSM independent from the 'integrity' LSM by introducing IMA
> >> own integrity metadata (
On Wed, Dec 27, 2023 at 2:40 AM Meng, Li (Jassmine) wrote:
>
> [AMD Official Use Only - General]
>
> Hi Rafael:
>
> > -Original Message-
> > From: Meng, Li (Jassmine)
> > Sent: Tuesday, December 26, 2023 4:27 PM
> > To: Rafael J. Wysocki
> > Cc: Rafael J . Wysocki ; Huang, Ray
> > ; linux
On 12/27/2023 2:22 PM, Mimi Zohar wrote:
On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote:
From: Roberto Sassu
Make the 'ima' LSM independent from the 'integrity' LSM by introducing IMA
own integrity metadata (ima_iint_cache structure, with IMA-specific fields
from the integrity_iint_cac
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 | 118 +++
1 file changed, 118 insertions(+)
This adds the data structure invalidating caches for the nested domain
allocated with IOMMU_HWPT_DATA_VTD_S1 type.
Signed-off-by: Lu Baolu
Signed-off-by: Yi Liu
---
include/uapi/linux/iommufd.h | 55
1 file changed, 55 insertions(+)
diff --git a/include/uap
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
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 | 31 +++--
drivers/iommu/intel/iommu.h | 2 +-
drivers/iommu/intel/irq_remapping.c | 2 +-
dri
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 | 175 ++
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: 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
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
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: 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
On 2023/12/27 17:27, Duan, Zhenzhong wrote:
-Original Message-
From: Liu, Yi L
Subject: [PATCH v7 9/9] iommu/vt-d: Add iotlb flush for nested domain
From: Lu Baolu
This implements the .cache_invalidate_user() callback to support iotlb
flush for nested domain.
Signed-off-by: Lu Bao
On 2023/12/27 17:33, Ethan Zhao wrote:
On 12/27/2023 5:06 PM, Duan, Zhenzhong wrote:
-Original Message-
From: Liu, Yi L
Sent: Tuesday, December 26, 2023 4:44 PM
Subject: Re: [PATCH v7 7/9] iommu/vt-d: Allow qi_submit_sync() to return
the QI faults
On 2023/12/26 14:15, Yi Liu wrote:
On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote:
> From: Roberto Sassu
>
> Make the 'ima' LSM independent from the 'integrity' LSM by introducing IMA
> own integrity metadata (ima_iint_cache structure, with IMA-specific fields
> from the integrity_iint_cache structure), and by managing it
Add a sample board file describing the file's format and with the list
of devices expected to be probed on the XPS 13 9300 machine as an
example x86 platform.
Test output:
TAP version 13
Using board file: boards/Dell Inc.,XPS 13 9300.yaml
1..22
ok 1 /pci-controller/14.0/usb2-controller/9/camera.d
Add a sample board file describing the file's format and with the list
of devices expected to be probed on the google,spherion machine as an
example.
Test output:
TAP version 13
Using board file: boards/google,spherion.yaml
1..8
ok 1 /usb2-controller@1120/1.4.1/camera.device
ok 2 /usb2-contro
Add a new test to verify that a list of expected devices from
discoverable busses (ie USB, PCI) have been successfully instantiated
and probed by a driver.
The per-platform list of expected devices is selected from the ones
under the boards/ directory based on the DT compatible or the DMI IDs.
Si
Hi,
for this v3 I changed the approach for identifying devices in a stable
way from the match fields back to the hardware topology (used in v1).
The match fields were proposed as a way to avoid the possible issue of
PCI topology being reconfigured, but that wasn't observed on any real
system so
On 12/27/2023 5:06 PM, Duan, Zhenzhong wrote:
-Original Message-
From: Liu, Yi L
Sent: Tuesday, December 26, 2023 4:44 PM
Subject: Re: [PATCH v7 7/9] iommu/vt-d: Allow qi_submit_sync() to return
the QI faults
On 2023/12/26 14:15, Yi Liu wrote:
On 2023/12/26 12:13, Tian, Kevin wrot
>-Original Message-
>From: Liu, Yi L
>Subject: [PATCH v7 9/9] iommu/vt-d: Add iotlb flush for nested domain
>
>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
>Signe
>-Original Message-
>From: Liu, Yi L
>Sent: Tuesday, December 26, 2023 4:44 PM
>Subject: Re: [PATCH v7 7/9] iommu/vt-d: Allow qi_submit_sync() to return
>the QI faults
>
>On 2023/12/26 14:15, Yi Liu wrote:
>>
>>
>> On 2023/12/26 12:13, Tian, Kevin wrote:
From: Liu, Yi L
Sent:
37 matches
Mail list logo