Re: [PATCH] selftests/rseq: fix kselftest Clang build warnings

2023-09-26 Thread Justin Stitt
Ping. Looking to get this patch and [1] slated for 6.7 which fixes some kselftest builds on older kernels. On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote: > > When building with Clang, I am getting many warnings from the selftests/rseq > tree. > > Here's one such example from rseq tree: > |

Re: [PATCH v2 0/3] selftests/hid: fix building for older kernels

2023-09-26 Thread Justin Stitt
Hey all, Gentle ping on this patch. Looking to get this patch and [1] slated for 6.7 wherein we can start getting cleaner kselftests builds. I do not think I am able to successfully run the hid/bpf selftests due to my kernel version being too low (and an inability to upgrade it as I'm on a corp r

Re: [PATCH] kunit: Fix a null-ptr-deref bug in kunit_run_case_catch_errors()

2023-09-26 Thread Ruan Jinjie
Ping. On 2023/9/15 15:41, Jinjie Ruan wrote: > Inject fault while probing kunit-test.ko, the below null-ptr-deref > occurs. > > In kunit_run_case_catch_errors(), if the first kunit_try_catch_run() > fails in kthread_run(), the kunit_try_run_case() will not run, so the > kunit_resource_test_init()

RE: [PATCH v4 03/17] iommufd: Unite all kernel-managed members into a struct

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:51 PM > > From: Nicolin Chen > > The struct iommufd_hw_pagetable has been representing a kernel-managed > HWPT, yet soon will be reused to represent a user-managed HWPT. These > two types of HWPTs has the same IOMMUFD object type and an >

RE: [PATCH v4 05/17] iommufd: Separate kernel-managed HWPT alloc/destroy/abort functions

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:51 PM > > -void iommufd_hw_pagetable_destroy(struct iommufd_object *obj) > +static void iommufd_kernel_managed_hwpt_destroy(struct > iommufd_object *obj) '_managed_' could be removed. 'kernel_hwpt' and 'user_hwpt' are clear enough. ditto

RE: [PATCH v4 07/17] iommufd: Add user-managed hw_pagetable support

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:51 PM > > +static void iommufd_user_managed_hwpt_abort(struct iommufd_object > *obj) > +{ > + struct iommufd_hw_pagetable *hwpt = > + container_of(obj, struct iommufd_hw_pagetable, obj); > + > + /* The parent->mutex must

RE: [PATCH v4 08/17] iommufd: Always setup MSI and anforce cc on kernel-managed domains

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:51 PM > > From: Nicolin Chen > > Now enforce_cache_coherency and msi_cookie are kernel-managed hwpt > things. > So, they should be only setup on kernel-managed domains. If the attaching > domain is a user-managed domain, redirect the hwpt

[RFC 5/8] iommufd/selftest: Add a helper to get test device

2023-09-26 Thread Yi Liu
There is need to get the selftest device (sobj->type == TYPE_IDEV) in multiple places, so have a helper to for it. Signed-off-by: Yi Liu --- drivers/iommu/iommufd/selftest.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/iommu

[RFC 1/8] iommu: Introduce a replace API for device pasid

2023-09-26 Thread Yi Liu
From: Lu Baolu Provide a high-level API to allow replacements of one domain with another for specific pasid of a device. This is similar to iommu_group_replace_domain() and it is also expected to be used only by IOMMUFD. Signed-off-by: Lu Baolu Signed-off-by: Yi Liu --- drivers/iommu/iommu-pr

[RFC 3/8] iommufd: Support attach/replace hwpt per pasid

2023-09-26 Thread Yi Liu
From: Kevin Tian This introduces three APIs for device drivers to manage pasid attach/ replace/detach. int iommufd_device_pasid_attach(struct iommufd_device *idev, u32 pasid, u32 *pt_id); int iommufd_device_pasid_replace(struct iommufd_device *idev,

[RFC 4/8] iommufd/selftest: Add set_dev_pasid and remove_dev_pasid in mock iommu

2023-09-26 Thread Yi Liu
The two callbacks are needed to make pasid_attach/detach path complete for mock device. A nop is enough for set_dev_pasid, a domain type check in the remove_dev_pasid is also helpful. Signed-off-by: Yi Liu --- drivers/iommu/iommufd/selftest.c | 28 1 file changed, 28

[RFC 8/8] iommu/vt-d: Add set_dev_pasid callback for nested domain

2023-09-26 Thread Yi Liu
From: Lu Baolu This allows the upper layers to set a nested type domain to a PASID of a device if the PASID feature is supported by the IOMMU hardware. Signed-off-by: Lu Baolu Signed-off-by: Yi Liu --- drivers/iommu/intel/nested.c | 47 1 file changed, 47

[RFC 6/8] iommufd/selftest: Add test ops to test pasid attach/detach

2023-09-26 Thread Yi Liu
This adds 4 test ops for pasid attach/replace/detach testing. There are ops to attach/detach pasid, and also op to check the attached domain of a pasid. Signed-off-by: Yi Liu --- drivers/iommu/iommufd/iommufd_test.h | 24 +++ drivers/iommu/iommufd/selftest.c | 98

[RFC 2/8] iommufd: replace attach_fn with a structure

2023-09-26 Thread Yi Liu
Most of the core logic before conducting the actual device attach/ replace operation can be shared with pasid attach/replace. Create a new structure so more information (e.g. pasid) can be later added along with the attach_fn. Signed-off-by: Kevin Tian Signed-off-by: Yi Liu --- drivers/iommu/io

[RFC 0/8] iommufd support pasid attach/replace

2023-09-26 Thread Yi Liu
PASID (Process Address Space ID) is a PCIe extension to tag the DMA transactions out of a physical device, and most modern IOMMU hardware have supported PASID granular address translation. So a PASID-capable devices can be attached to multiple hwpts (a.k.a. domains), each attachment is tagged with

[RFC 7/8] iommufd/selftest: Add coverage for iommufd pasid attach/detach

2023-09-26 Thread Yi Liu
This tests iommufd pasid attach/replace/detach. Signed-off-by: Yi Liu --- tools/testing/selftests/iommu/iommufd.c | 172 ++ .../selftests/iommu/iommufd_fail_nth.c| 28 ++- tools/testing/selftests/iommu/iommufd_utils.h | 78 3 files changed, 274 insertions

[RFC 3/3] vfio/pci: Expose PCIe PASID capability to userspace

2023-09-26 Thread Yi Liu
This exposes PCIe PASID capability to userspace and where to emulate this capability if wants to further expose it to VM. And this only exposes PASID capability for devices which has PCIe PASID extended struture in its configuration space. While for VFs, userspace is still unable to see this capab

[RFC 2/3] vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT

2023-09-26 Thread Yi Liu
This adds ioctls for the userspace to attach a given pasid of a vfio device to/from an IOAS/HWPT. Signed-off-by: Yi Liu --- drivers/vfio/device_cdev.c | 45 +++ drivers/vfio/vfio.h| 4 +++ drivers/vfio/vfio_main.c | 8 ++ include/uapi/linux/vfio.h | 5

[RFC 0/3] vfio-pci support pasid attach/detach

2023-09-26 Thread Yi Liu
This adds the pasid attach/detach uAPIs for userspace to attach/detach a PASID of a device to/from a given ioas/hwpt. Only vfio-pci driver is enabled in this series. After this series, PASID-capable devices bound with vfio-pci can report PASID capability to userspace and VM to enable PASID usages l

[RFC 1/3] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices

2023-09-26 Thread Yi Liu
From: Kevin Tian This adds pasid_at|de]tach_ioas ops for attaching hwpt to pasid of a device and the helpers for it. For now, only vfio-pci supports pasid attach/detach. Signed-off-by: Kevin Tian Signed-off-by: Yi Liu --- drivers/vfio/iommufd.c | 48 +

Re: [PATCH net-next v4 3/6] net: bridge: Track and limit dynamically learned FDB entries

2023-09-26 Thread Ido Schimmel
On Tue, Sep 19, 2023 at 10:12:50AM +0200, Johannes Nixdorf wrote: > A malicious actor behind one bridge port may spam the kernel with packets > with a random source MAC address, each of which will create an FDB entry, > each of which is a dynamic allocation in the kernel. > > There are roughly 2^4

Re: [PATCH net-next v4 5/6] net: bridge: Add a configurable default FDB learning limit

2023-09-26 Thread Ido Schimmel
On Thu, Sep 21, 2023 at 01:19:44PM +0300, Nikolay Aleksandrov wrote: > I'm not strongly against, just IMO it is unnecessary. I won't block the set > because of this, but it would be nice to get input from others as > well. If you can recompile your kernel to set a limit, it should be easier > to ch

Re: [PATCH] selftests/cgroup: Fix awk usage in test_cpuset_prs.sh that may cause error

2023-09-26 Thread Waiman Long
On 9/25/23 15:38, Juntong Deng wrote: According to the awk manual, the -e option does not need to be specified in front of 'program' (unless you need to mix program-file). The redundant -e option can cause error when users use awk tools other than gawk (for example, mawk does not support the -e

Re: [PATCH bpf-next v1] bpf/selftests: improve arg parsing in test_verifier

2023-09-26 Thread Jiri Olsa
On Mon, Sep 25, 2023 at 04:37:02PM -0700, Tony Ambardar wrote: > Current test_verifier provides little feedback or argument validation, > instead silently falling back to running all tests in case of user error > or even expected use cases. Trying to do manual exploratory testing, > switching betwe

Re: [PATCH bpf-next v1] bpf/selftests: improve arg parsing in test_verifier

2023-09-26 Thread Jiri Olsa
On Mon, Sep 25, 2023 at 04:37:02PM -0700, Tony Ambardar wrote: SNIP > @@ -1848,36 +1850,40 @@ int main(int argc, char **argv) > { > unsigned int from = 0, to = ARRAY_SIZE(tests); > bool unpriv = !is_admin(); > - int arg = 1; > - > - if (argc > 1 && strcmp(argv[1], "-v") == 0)

Re: [PATCH] kunit: Check for kunit_parse_glob_filter() failure

2023-09-26 Thread Dan Carpenter
On Tue, Sep 19, 2023 at 02:49:43PM -0400, Rae Moar wrote: > On Fri, Sep 15, 2023 at 8:58 AM Dan Carpenter > wrote: > > > > Smatch complains that the missing error checks would lead to a crash: > > > > lib/kunit/executor_test.c:40 parse_filter_test() > > error: double free of 'filter.test_

[GIT PULL] Kselftest fixes update for Linux 6.6-rc4

2023-09-26 Thread Shuah Khan
Hi Linus, Please pull the following Kselftest fixes update for Linux 6.6-rc4. This kselftest fixes update for Linux 6.6-rc4 consists of one single fix to unmount tracefs when test created mount. diff is attached. thanks. -- Shuah ---

Re: [PATCH] iommufd/selftest: Iterate idev_ids in mock_domain's alloc_hwpt test

2023-09-26 Thread Jason Gunthorpe
On Mon, Sep 18, 2023 at 06:16:37PM -0700, Nicolin Chen wrote: > The point in iterating variant->mock_domains is to test the idev_ids[0] > and idev_ids[1]. So use it instead of keeping testing idev_ids[0] only. > > Signed-off-by: Nicolin Chen > --- > Jason/Kevin, I formated the patch with "-U4" so

Re: [GIT PULL] Kselftest fixes update for Linux 6.6-rc4

2023-09-26 Thread pr-tracker-bot
The pull request you sent on Tue, 26 Sep 2023 09:24:47 -0600: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux-kselftest-fixes-6.6-rc4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/50768a425b46ad7d98f6d88c22d41aa026c463cf Thank you!

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-09-26 Thread Jason Gunthorpe
On Tue, Sep 26, 2023 at 06:37:55AM +, Tian, Kevin wrote: > > From: Robin Murphy > > Sent: Friday, September 22, 2023 5:48 PM > > > > I could go on enjoying myself, but basically yeah, "default" can't be a > > type in itself (at best it would be a meta-type which could be > > requested, such t

[PATCH] selftests: Fix wrong TARGET in kselftest top level Makefile

2023-09-26 Thread Juntong Deng
The 'uevents' subdirectory does not exist in tools/testing/selftests/ and adding 'uevents' to the TARGETS list results in the following error: make[1]: Entering directory 'xx/tools/testing/selftests/uevents' make[1]: *** No targets specified and no makefile found. Stop. make[1]: Leaving directory

Re: [PATCH v5 0/8] selftests/resctrl: Rework benchmark command handling

2023-09-26 Thread Reinette Chatre
Hi Shuah, Could you please consider this series for inclusion? Thank you very much Reinette On 9/4/2023 2:53 AM, Ilpo Järvinen wrote: > The benchmark command handling (-b) in resctrl selftests is overly > complicated code. This series turns the benchmark command immutable to > preserve it for a

[PATCH] selftests/mm: Fix awk usage in charge_reserved_hugetlb.sh and hugetlb_reparenting_test.sh that may cause error

2023-09-26 Thread Juntong Deng
According to the awk manual, the -e option does not need to be specified in front of 'program' (unless you need to mix program-file). The redundant -e option can cause error when users use awk tools other than gawk (for example, mawk does not support the -e option). Error Example: awk: not an opt

Re: [PATCH] selftests/rseq: fix kselftest Clang build warnings

2023-09-26 Thread Mathieu Desnoyers
On 9/26/23 08:20, Justin Stitt wrote: Ping. Looking to get this patch and [1] slated for 6.7 which fixes some kselftest builds on older kernels. On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote: When building with Clang, I am getting many warnings from the selftests/rseq tree. Here's one

Re: [PATCH] selftests/rseq: fix kselftest Clang build warnings

2023-09-26 Thread Shuah Khan
On 9/26/23 13:02, Mathieu Desnoyers wrote: On 9/26/23 08:20, Justin Stitt wrote: Ping. Looking to get this patch and [1] slated for 6.7 which fixes some kselftest builds on older kernels. On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote: When building with Clang, I am getting many warning

[PATCH 1/2] kunit: Add param generator macro for zero terminated arrays

2023-09-26 Thread Michal Wajdeczko
The existing macro KUNIT_ARRAY_PARAM can produce parameter generator function but only when we fully know the definition of the array. However, there might be cases where we would like to generate test params based on externaly defined array, which is defined as zero-terminated array, like pci_driv

[PATCH 2/2] kunit: Allow to filter entries from zero terminated arrays

2023-09-26 Thread Michal Wajdeczko
In some cases we may want to generate params based on existing zero terminated array, but with some entries filtered out. Extend macro KUNIT_ZERO_ARRAY_PARAM to accept filter function and provide example how to use it. $ ./tools/testing/kunit/kunit.py run \ --kunitconfig ./lib/kunit/.kunitconf

Re: [PATCH v2 5/6] selftests/resctrl: Fix feature checks

2023-09-26 Thread Reinette Chatre
Hi Ilpo, On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > The MBA and CMT tests expect support of other features to be able to > run. > > When platform only supports MBA but not MBM, MBA test will fail with: > Failed to open total bw file: No such file or directory > > When platform only supports CM

Re: [PATCH v2 4/6] selftests/resctrl: Refactor feature check to use resource and feature name

2023-09-26 Thread Reinette Chatre
Hi Ilpo, On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > Feature check in validate_resctrl_feature_request() takes in the test > name string and maps that to what to check per test. > > Pass resource and feature names to validate_resctrl_feature_request() > directly rather than deriving them from th

Re: [PATCH v3 4/4] kunit: test: Fix the possible memory leak in executor_test

2023-09-26 Thread kernel test robot
Hi Jinjie, kernel test robot noticed the following build warnings: [auto build test WARNING on linus/master] [also build test WARNING on v6.6-rc3 next-20230926] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

Re: [PATCH v2 6/6] selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests

2023-09-26 Thread Reinette Chatre
Hi Ilpo, On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > The initial value of 5% chosen for the maximum allowed percentage > difference between resctrl mbm value and IMC mbm value in commit > 06bd03a57f8c ("selftests/resctrl: Fix MBA/MBM results reporting > format") was "randomly chosen value" (as ad

Re: [PATCH v2 2/6] selftests/resctrl: Remove duplicate feature check from CMT test

2023-09-26 Thread Reinette Chatre
Hi Ilpo, On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > The test runner run_cmt_test() in resctrl_tests.c checks for CMT > feature and does not run cmt_resctrl_val() if CMT is not supported. > Then cmt_resctrl_val() also check is CMT is supported. > > Remove the duplicated feature check for CMT fro

Re: [PATCH v5 0/8] selftests/resctrl: Rework benchmark command handling

2023-09-26 Thread Moger, Babu
Tested the series on AMD system. Looks good. Tested-by: Babu Moger There are few tests which are skipped on AMD. Will plan to look into it. Thanks Babu On 9/4/23 04:53, Ilpo Järvinen wrote: > The benchmark command handling (-b) in resctrl selftests is overly > complicated code. This series turn

Re: [PATCH] selftests: Fix wrong TARGET in kselftest top level Makefile

2023-09-26 Thread Shuah Khan
On 9/26/23 12:03, Juntong Deng wrote: The 'uevents' subdirectory does not exist in tools/testing/selftests/ and adding 'uevents' to the TARGETS list results in the following error: make[1]: Entering directory 'xx/tools/testing/selftests/uevents' make[1]: *** No targets specified and no makefile

RE: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-09-26 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, September 27, 2023 12:29 AM > > On Tue, Sep 26, 2023 at 06:37:55AM +, Tian, Kevin wrote: > > > From: Robin Murphy > > > Sent: Friday, September 22, 2023 5:48 PM > > > > > > I could go on enjoying myself, but basically yeah, "default" can't be a > >

Re: [RFC 1/8] iommu: Introduce a replace API for device pasid

2023-09-26 Thread Baolu Lu
On 9/26/23 5:26 PM, Yi Liu wrote: From: Lu Baolu Provide a high-level API to allow replacements of one domain with another for specific pasid of a device. This is similar to iommu_group_replace_domain() and it is also expected to be used only by IOMMUFD. Signed-off-by: Lu Baolu Signed-off-by:

Re: [PATCH] selftests/rseq: fix kselftest Clang build warnings

2023-09-26 Thread Shuah Khan
On 9/26/23 14:39, Shuah Khan wrote: On 9/26/23 13:02, Mathieu Desnoyers wrote: On 9/26/23 08:20, Justin Stitt wrote: Ping. Looking to get this patch and [1] slated for 6.7 which fixes some kselftest builds on older kernels. On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote: When building

kselftest/fixes build: 6 builds: 0 failed, 6 passed, 1 warning (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)

2023-09-26 Thread kernelci.org bot
kselftest/fixes build: 6 builds: 0 failed, 6 passed, 1 warning (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df) Full Build Summary: https://kernelci.org/build/kselftest/branch/fixes/kernel/linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df/ Tree: kselftest Branch: fixes Git Describe: linux-kselftest-

Re: [RFC 2/8] iommufd: replace attach_fn with a structure

2023-09-26 Thread Baolu Lu
On 9/26/23 5:26 PM, Yi Liu wrote: Most of the core logic before conducting the actual device attach/ replace operation can be shared with pasid attach/replace. Create a new structure so more information (e.g. pasid) can be later added along with the attach_fn. Signed-off-by: Kevin Tian Signed-of

kselftest/fixes kselftest-seccomp: 3 runs, 3 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)

2023-09-26 Thread kernelci.org bot
kselftest/fixes kselftest-seccomp: 3 runs, 3 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---

Re: [PATCH v3] list: test: potential dereference of null pointer

2023-09-26 Thread David Gow
On Sat, 23 Sept 2023 at 08:54, Ma Ke wrote: > > To avoid the failure of alloc, we could check the return value of > kmalloc() and kzalloc(). > > Signed-off-by: Ma Ke > --- Thanks very much. This looks good to me. We could change the rest of the allocations to also use kunit_kzalloc(), but equall

kselftest/fixes kselftest-lkdtm: 3 runs, 2 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)

2023-09-26 Thread kernelci.org bot
kselftest/fixes kselftest-lkdtm: 3 runs, 2 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+-

kselftest/next kselftest-seccomp: 4 runs, 3 regressions (v6.6-rc2-2-g078a2ead544c)

2023-09-26 Thread kernelci.org bot
kselftest/next kselftest-seccomp: 4 runs, 3 regressions (v6.6-rc2-2-g078a2ead544c) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+-

RE: [RFC 2/8] iommufd: replace attach_fn with a structure

2023-09-26 Thread Tian, Kevin
> From: Baolu Lu > Sent: Wednesday, September 27, 2023 10:18 AM > > On 9/26/23 5:26 PM, Yi Liu wrote: > > > > -typedef struct iommufd_hw_pagetable *(*attach_fn)( > > - struct iommufd_device *idev, struct iommufd_hw_pagetable *hwpt); > > +static struct iommufd_hw_pagetable *do_attach(struct iomm

Re: [PATCH v2 1/6] selftests/resctrl: Extend signal handler coverage to unmount on receiving signal

2023-09-26 Thread Reinette Chatre
Hi Ilpo, On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > Unmounting resctrl FS has been moved into the per test functions in > resctrl_tests.c by commit caddc0fbe495 ("selftests/resctrl: Move > resctrl FS mount/umount to higher level"). In case a signal (SIGINT, > SIGTERM, or SIGHUP) is received, the

kselftest/next kselftest-cpufreq: 7 runs, 4 regressions (v6.6-rc2-2-g078a2ead544c)

2023-09-26 Thread kernelci.org bot
kselftest/next kselftest-cpufreq: 7 runs, 4 regressions (v6.6-rc2-2-g078a2ead544c) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+-

kselftest/fixes kselftest-lib: 3 runs, 3 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)

2023-09-26 Thread kernelci.org bot
kselftest/fixes kselftest-lib: 3 runs, 3 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---

Re: [RFC 3/8] iommufd: Support attach/replace hwpt per pasid

2023-09-26 Thread Baolu Lu
On 9/26/23 5:26 PM, Yi Liu wrote: From: Kevin Tian This introduces three APIs for device drivers to manage pasid attach/ replace/detach. int iommufd_device_pasid_attach(struct iommufd_device *idev, u32 pasid, u32 *pt_id); int iommufd_device_pasid_re

RE: [RFC 3/8] iommufd: Support attach/replace hwpt per pasid

2023-09-26 Thread Tian, Kevin
> From: Baolu Lu > Sent: Wednesday, September 27, 2023 10:49 AM > > On 9/26/23 5:26 PM, Yi Liu wrote: > > From: Kevin Tian > > > > This introduces three APIs for device drivers to manage pasid attach/ > > replace/detach. > > > > int iommufd_device_pasid_attach(struct iommufd_device *idev, >

kselftest/fixes kselftest-livepatch: 1 runs, 1 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)

2023-09-26 Thread kernelci.org bot
kselftest/fixes kselftest-livepatch: 1 runs, 1 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +---+---+--+

Re: [PATCH v2 2/9] RISC-V: Detect XVentanaCondOps from ISA string

2023-09-26 Thread Charlie Jenkins
On Tue, Sep 26, 2023 at 09:44:38AM +0530, Anup Patel wrote: > On Tue, Sep 26, 2023 at 9:38 AM Anup Patel wrote: > > > > On Mon, Sep 25, 2023 at 11:18 PM Charlie Jenkins > > wrote: > > > > > > On Mon, Sep 25, 2023 at 07:08:52PM +0530, Anup Patel wrote: > > > > The Veyron-V1 CPU supports custom co

kselftest/next kselftest-lkdtm: 3 runs, 2 regressions (v6.6-rc2-2-g078a2ead544c)

2023-09-26 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 3 runs, 2 regressions (v6.6-rc2-2-g078a2ead544c) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+--+-

Re: [PATCH v2 3/6] selftests/resctrl: Move _GNU_SOURCE define into Makefile

2023-09-26 Thread Reinette Chatre
Hi Ilpo, On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > Currently, _GNU_SOURCE is defined in resctrl.h. Defining _GNU_SOURCE nitpick: If you do submit a new version, could you please drop the "Currently". > has a large impact on what gets defined when including headers either > before or after it.

kselftest/fixes kselftest-cpufreq: 8 runs, 4 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df)

2023-09-26 Thread kernelci.org bot
kselftest/fixes kselftest-cpufreq: 8 runs, 4 regressions (linux-kselftest-fixes-6.6-rc4-1-g6f874fa021df) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---

kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.6-rc2-2-g078a2ead544c)

2023-09-26 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.6-rc2-2-g078a2ead544c) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +---+---+--+--

kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning (v6.6-rc2-2-g078a2ead544c)

2023-09-26 Thread kernelci.org bot
kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning (v6.6-rc2-2-g078a2ead544c) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.6-rc2-2-g078a2ead544c/ Tree: kselftest Branch: next Git Describe: v6.6-rc2-2-g078a2ead544c Git Commit: 078a2ead544c56fbe6a3bed8

kselftest/next kselftest-lib: 3 runs, 3 regressions (v6.6-rc2-2-g078a2ead544c)

2023-09-26 Thread kernelci.org bot
kselftest/next kselftest-lib: 3 runs, 3 regressions (v6.6-rc2-2-g078a2ead544c) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+--+---

RE: [PATCH v5 01/11] iommufd: Add data structure for Intel VT-d stage-1 domain allocation

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:54 PM > > This adds IOMMU_HWPT_TYPE_VTD_S1 for stage-1 hw_pagetable of Intel > VT-d > and the corressponding data structure for userspace specified parameter > for the domain allocation. > > Signed-off-by: Yi Liu Reviewed-by: Kevin Tian

RE: [PATCH v5 04/11] iommu/vt-d: Add helper to setup pasid nested translation

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:54 PM > + > +/** > + * intel_pasid_setup_nested() - Set up PASID entry for nested translation. > + * @iommu: IOMMU which the device belong to > + * @dev:Device to be set up for translation > + * @pasid: PASID to be programm

RE: [PATCH v5 06/11] iommu/vt-d: Set the nested domain to a device

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:54 PM > > + > + /* Is s2_domain compatible with this IOMMU? */ Add more words on why prepare_attach uses s2_domain when the actual attach is for s1 > + ret = prepare_domain_attach_device(&dmar_domain->s2_domain- > >domain, dev); >

[PATCH] selftests/x86/lam: Zero out buffer for readlink()

2023-09-26 Thread Binbin Wu
Zero out the buffer for readlink() since readlink() does not append a terminating null byte to the buffer. Fixes: 833c12ce0f430 ("selftests/x86/lam: Add inherit test cases for linear-address masking") Signed-off-by: Binbin Wu --- tools/testing/selftests/x86/lam.c | 2 +- 1 file changed, 1 inse

RE: [PATCH v5 07/11] iommufd: Add data structure for Intel VT-d stage-1 cache invalidation

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:54 PM > > +/** > + * enum iommu_hwpt_vtd_s1_invalidate_flags - Flags for Intel VT-d > + * stage-1 cache invalidation > + * @IOMMU_VTD_QI_FLAGS_LEAF: The LEAF flag indicates whether only the > + *

RE: [PATCH v5 09/11] iommu/vt-d: Add iotlb flush for nested domain

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:54 PM > + > + /* REVISIT: > + * VT-d has defined ITE, ICE, IQE for invalidation failure per hardware, > + * but no error code yet, so just set the error code to be 0. > + */ > + *cerror_idx = 0; > + Is it "hardware do

RE: [PATCH v5 10/11] iommu/vt-d: Add nested domain allocation

2023-09-26 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, September 21, 2023 3:55 PM > > > + if (hwpt_type != IOMMU_HWPT_TYPE_DEFAULT && > + hwpt_type != IOMMU_HWPT_TYPE_VTD_S1) > + return ERR_PTR(-EINVAL); > + > + if ((hwpt_type == IOMMU_HWPT_TYPE_DEFAULT) == !!parent) > + ret