This happens on 64-bit big-endian machines.
SO_RCVLOWAT requires an int parameter. However, instead of int, the test
uses unsigned long in one place and size_t in another. Both are 8 bytes
long on 64-bit machines. The kernel, having received the 8 bytes, doesn't
test for the exact size of the param
> From: Nicolin Chen
> Sent: Tuesday, October 22, 2024 8:19 AM
>
> +static struct iommufd_hwpt_nested *
> +iommufd_hwpt_nested_alloc_for_viommu(struct iommufd_viommu
> *viommu,
> + const struct iommu_user_data *user_data)
probably "_for" can be skipped to reduce t
> From: Nicolin Chen
> Sent: Tuesday, October 22, 2024 8:19 AM
> +
> + viommu->type = cmd->type;
> + viommu->ictx = ucmd->ictx;
> + viommu->hwpt = hwpt_paging;
> + /* Assume physical IOMMUs are unpluggable (the most likely case)
> */
> + viommu->iommu_dev = __iommu_get_iommu_de
On Sun, Oct 13, 2024 at 11:32 AM wrote:
>
> From: Wenyu Huang
>
> It used for testing in tools/virtio/vringh_test.c.
> If vring_new_virtqueue supports packed vring, we can add support for
> packed vring to vringh and test it.
>
> Signed-off-by: Wenyu Huang
> ---
Acked-by: Jason Wang
Thanks
> From: Jason Gunthorpe
> Sent: Tuesday, October 22, 2024 9:16 PM
>
> On Tue, Oct 22, 2024 at 04:59:07PM +0800, Baolu Lu wrote:
>
> > Is it feasible to make vIOMMU object more generic, rather than strictly
> > tying it to nested translation? For example, a normal paging domain that
> > translate
On Fri, Oct 25, 2024 at 09:40:04AM +0800, Li Zhijian wrote:
> index 12dc3fcd3456..1407fd24a97b 100644
> --- a/tools/testing/selftests/alsa/.gitignore
> +++ b/tools/testing/selftests/alsa/.gitignore
> @@ -1,3 +1,5 @@
> mixer-test
> pcm-test
> test-pcmtest-driver
> +global-timer
> +utimer-test
>
On Wed, Oct 23, 2024 at 02:31:30AM +, Matthew Maurer wrote:
> From: Sami Tolvanen
>
> Previously, two things stopped Rust from using MODVERSIONS:
> 1. Rust symbols are occasionally too long to be represented in the
>original versions table
> 2. Rust types cannot be properly hashed by the
> From: Nicolin Chen
> Sent: Tuesday, October 22, 2024 8:20 AM
>
> With the introduction of the new object and its infrastructure, update the
> doc to reflect that and add a new graph.
>
> Reviewed-by: Jason Gunthorpe
> Signed-off-by: Nicolin Chen
Reviewed-by: Kevin Tian
Notable changes from v9:
* fixed potential deadlock between peer float and keepalive worker
* simplified skb CB layout to avoid allocating large mem area per pkt
* fixed double free along encryption/decryption error path
* fixed crash due to race condition in keepalive worker for p2p mode
* mitigat
Add tests to assert that PIDFD_SELF_* correctly refers to the current
thread and process.
This is only practically meaningful to pidfd_send_signal() and
pidfd_getfd(), but also explicitly test that we disallow this feature for
setns() where it would make no sense.
We cannot reasonably wait on our
On Mon, Oct 21, 2024 at 9:41 PM Dragos Tatulea wrote:
>
> From: Si-Wei Liu
>
> The starting iova address to iterate iotlb map entry within a range
> was set to an irrelevant value when passing to the itree_next()
> iterator, although luckily it doesn't affect the outcome of finding
> out the gran
> From: Nicolin Chen
> Sent: Tuesday, October 22, 2024 8:19 AM
>
> To support driver-allocated vIOMMU objects, it's suggested to call the
> allocator helper in IOMMU dirvers. However, there is no guarantee that
> drivers will all use it and allocate objects properly.
>
> Add a helper for iommufd
On Tue, 08 Oct 2024 02:41:37 PDT (-0700), zhangchun...@iscas.ac.cn wrote:
These patches are all simple fixes with no strong dependency though,
I hope that making them a patchset will be more convenient for merge.
It doesn't: there's two RISC-V fixes and two MM cleanups, which makes
stuff likel
On Wed, Oct 23, 2024 at 04:13:36PM +0200, Matthieu Baerts wrote:
> Hi Simon,
>
> Thank you for the reviews!
>
> On 23/10/2024 14:21, Simon Horman wrote:
> > On Mon, Oct 21, 2024 at 12:25:27PM +0200, Matthieu Baerts (NGI0) wrote:
> >> mptcp_get_available_schedulers() needs to iterate over the sche
It seems tests other than the pidfd tests use the wait_for_pid() function
declared in pidfd.h.
Since we will shortly be modifying pidfd.h in a way that might clash with
other tests, separate this out and update tests accordingly.
Signed-off-by: Lorenzo Stoakes
---
tools/testing/selftests/cgroup
On Fri, Oct 25, 2024 at 6:41 PM John Hubbard wrote:
>
> On 10/25/24 5:50 AM, Pedro Falcato wrote:
> > On Fri, Oct 25, 2024 at 10:41 AM Lorenzo Stoakes
> > wrote:
> ...
> >> +static inline int pidfd_is_self_sentinel(pid_t pid)
> >> +{
> >> + return pid == PIDFD_SELF_THREAD || pid == PIDFD_SE
On 10/25/24 11:38 AM, Pedro Falcato wrote:
On Fri, Oct 25, 2024 at 6:41 PM John Hubbard wrote:
On 10/25/24 5:50 AM, Pedro Falcato wrote:
On Fri, Oct 25, 2024 at 10:41 AM Lorenzo Stoakes
wrote:
...
+static inline int pidfd_is_self_sentinel(pid_t pid)
+{
+ return pid == PIDFD_SELF_THRE
On 10/25/24 5:50 AM, Pedro Falcato wrote:
On Fri, Oct 25, 2024 at 10:41 AM Lorenzo Stoakes
wrote:
...
+static inline int pidfd_is_self_sentinel(pid_t pid)
+{
+ return pid == PIDFD_SELF_THREAD || pid == PIDFD_SELF_THREAD_GROUP;
+}
Do we want this in the uapi header? Even if this is usef
On 4.10.2024 11:23 PM, Mukesh Ojha wrote:
> Qualcomm SoCs running with the Qualcomm EL2 hypervisor(QHEE) have been
> utilizing the Peripheral Authentication Service (PAS) from its TrustZone
> (TZ) firmware to securely authenticate and reset via sequence of SMC
> calls like qcom_scm_pas_init_image()
On 4.10.2024 11:23 PM, Mukesh Ojha wrote:
> For Qualcomm SoCs runnning with Qualcomm EL2 hypervisor(QHEE), IOMMU
> translation for remote processors is managed by QHEE and if the same SoC
> run under KVM, remoteproc carveout and devmem region should be IOMMU
> mapped from Linux PAS driver before re
On 10/24/24 6:40 PM, Li Zhijian wrote:
Compiled binary files should be added to .gitignore
'git status' complains:
Untracked files:
(use "git add ..." to include in what will be committed)
mm/hugetlb_dio
mm/pkey_sighandler_tests_32
mm/pkey_sighandler_tests_64
Use KVM or HVF if supported by the QEMU binary and available on the
system.
This produces a nice improvement on my Apple M3 Pro running macOS 14.7:
Before:
./tools/testing/kunit/kunit.py exec --arch arm64
[HH:MM:SS] Elapsed time: 10.145s
After:
./tools/testing/kunit/kunit.py exec --arch arm64
[H
Add a new IOMMUFD_OBJ_VIOMMU with an iommufd_viommu structure to represent
a slice of physical IOMMU device passed to or shared with a user space VM.
This slice, now a vIOMMU object, is a group of virtualization resources of
a physical IOMMU's, such as:
- Security namespace for guest owned ID, e.g
This series introduces a new vIOMMU infrastructure and related ioctls.
IOMMUFD has been using the HWPT infrastructure for all cases, including a
nested IO page table support. Yet, there're limitations for an HWPT-based
structure to support some advanced HW-accelerated features, such as CMDQV
on NV
Prepare for an embedded structure design for driver-level iommufd_viommu
objects:
// include/linux/iommufd.h
struct iommufd_viommu {
struct iommufd_object obj;
};
// Some IOMMU driver
struct iommu_driver_viommu {
struct iommufd_viommu core;
A nested domain now can be allocated for a parent domain for a vIOMMU
object. Rework the existing allocators to prepare for the latter case.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/selftest.c | 89 ++--
1 file changed, 50 insertions(+), 39 deletions(-)
Now a vIOMMU holds a shareable nesting parent HWPT. So, it can act like
that nesting parent HWPT to allocate a nested HWPT.
Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update its kdoc.
Also, add an iommufd_hwpt_nested_alloc_for_viommu helper to allocate a
nested HWPT for a vIOMMU obje
With the introduction of the new object and its infrastructure, update the
doc to reflect that and add a new graph.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
Documentation/userspace-api/iommufd.rst | 69 -
1 file changed, 68 in
Add a new driver-type for ARM SMMUv3 to enum iommu_viommu_type. Implement
an arm_vsmmu_alloc() with its viommu op arm_vsmmu_domain_alloc_nested(),
to replace arm_smmu_domain_alloc_nesting(). As an initial step, copy the
VMID from s2_parent. A later cleanup series is required to move the VMID
alloca
Implement the viommu alloc/free functions to increase/reduce refcount of
its dependent mock iommu device. User space can verify this loop via the
IOMMU_VIOMMU_TYPE_SELFTEST.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 2 +
drivers/iommu/iommufd/selftest.c | 64 +++
Add a new iommufd_viommu FIXTURE and setup it up with a vIOMMU object.
Any new vIOMMU feature will be added as a TEST_F under that.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 28 ++
tools/testing/selftests/iommu/iommufd.c | 87 +++
To support driver-allocated vIOMMU objects, it's suggested to call the
allocator helper in IOMMU dirvers. However, there is no guarantee that
drivers will all use it and allocate objects properly.
Add a helper for iommufd core to verify if an unfinalized object is at
least reserved in the ictx.
R
Following the previous vIOMMU series, this adds another vDEVICE structure,
representing the association from an iommufd_device to an iommufd_viommu.
This gives the whole architecture a new "v" layer:
___
| i
A vIOMMU-based hwpt_nested requires a cache invalidation op too, either
using the one in iommu_domain_ops or the one in viommu_ops. Enforce that
upon the allocated hwpt_nested.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/hw_pagetable.c | 4 +++-
1 file changed, 3 insertions(+), 1 delet
This per-vIOMMU cache_invalidate op is like the cache_invalidate_user op
in struct iommu_domain_ops, but wider, supporting device cache (e.g. PCI
ATC invaldiations).
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h | 10 ++
1 file changed, 10 insertio
This avoids a bigger trouble of exposing struct iommufd_device and struct
iommufd_vdevice in the public header.
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h| 8
drivers/iommu/iommufd/driver.c | 13 +
2 files changed, 21 insertions(+)
diff --git a/include
Implement the vIOMMU's cache_invalidate op for user space to invalidate the
IOTLB entries, Device ATS and CD entries that are still cached by hardware.
Add struct iommu_viommu_arm_smmuv3_invalidate defining invalidation entries
that are simply in the native format of a 128-bit TLBI command. Scan t
From: Jason Gunthorpe
Now, ATC invalidation can be done with the vIOMMU invalidation op. A guest
owned IOMMU_DOMAIN_NESTED can do an ATS too. Allow it to pass in the EATS
field via the vSTE words.
Signed-off-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm
With a vIOMMU object, use space can flush any IOMMU related cache that can
be directed via a vIOMMU object. It is similar to the IOMMU_HWPT_INVALIDATE
uAPI, but can cover a wider range than IOTLB, e.g. device/desciprtor cache.
Allow hwpt_id of the iommu_hwpt_invalidate structure to carry a viommu_
Add a viommu_cache test function to cover vIOMMU invalidations using the
updated IOMMU_HWPT_INVALIDATE ioctl, which now allows passing in a vIOMMU
via its hwpt_id field.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 32
tools/testing/selftests/iommu/iommuf
With the introduction of the new object and its infrastructure, update the
doc and the vIOMMU graph to reflect that.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
Documentation/userspace-api/iommufd.rst | 41 +++--
1 file changed, 32 insertions(+), 9 deletions
Similar to IOMMU_TEST_OP_MD_CHECK_IOTLB verifying a mock_domain's iotlb,
IOMMU_TEST_OP_DEV_CHECK_CACHE will be used to verify a mock_dev's cache.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 5
tools/testing/selftests/iommu/iommufd_utils.h | 24 ++
From: Jason Gunthorpe
The iommu_copy_struct_from_user_array helper can be used to copy a single
entry from a user array which might not be efficient if the array is big.
Add a new iommu_copy_struct_from_full_user_array to copy the entire user
array at once. Update the existing iommu_copy_struct_
Add a new ioctl for user space to do a vIOMMU allocation. It must be based
on a nesting parent HWPT, so take its refcount.
IOMMU driver wanting to support vIOMMUs must define its IOMMU_VIOMMU_TYPE_
in the uAPI header and implement a viommu_alloc op in its iommu_ops.
Reviewed-by: Jason Gunthorpe
Use these inline helpers to shorten those container_of lines.
Note that one of them goes back and forth between iommu_domain and
mock_iommu_domain, which isn't necessary. So drop its container_of.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/selftest.c | 75 ++--
Main updates from version V11[1]:
- rename structures, functions, and variables from "tee_rproc_xxx" to
"rproc_tee_xxx",
- update rproc_tee_register to return an error instead of
"struct rproc_tee *" pointer
[1] https://lore.kernel.org/lkml/ZxZ4cBilIlpf3IPw@p14s/T/
Tested-on: 42f7652d3eb
This patch centralizing the cleanup of the resource table into a new
helper function rproc_release_fw().
More than just factorizing the code into a common function, it is the
first step to integrate the release of the firmware image loaded by the
OP-TEE remoteproc framework.
Suggested-by: Mathieu
On 10/25/24 12:49 PM, Lorenzo Stoakes wrote:
On Fri, Oct 25, 2024 at 11:44:34AM -0700, John Hubbard wrote:
On 10/25/24 11:38 AM, Pedro Falcato wrote:
On Fri, Oct 25, 2024 at 6:41 PM John Hubbard wrote:
...
That seems to only apply to the kernel internally, uapi headers are
Yes.
included
hello
On 10/23/24 17:32, Mathieu Poirier wrote:
> Hello Daniel,
>
> On Fri, Oct 18, 2024 at 02:09:29PM +0300, Daniel Baluta wrote:
>> Currently we generate notifyids in the linux kernel and override
>> those found in rsc_table.
>>
>> This doesn't play well with users expecting to use the exact id
When a resource table is loaded by an external entity such as U-boot or
OP-TEE, we do not necessarily get the device address(da) but the physical
address(pa).
This helper performs similar translation than the rproc_da_to_va()
but based on a physical address.
Signed-off-by: Arnaud Pouliquen
---
d
The "st,stm32mp1-m4-tee" compatible is utilized in a system configuration
where the Cortex-M4 firmware is loaded by the Trusted Execution Environment
(TEE).
For instance, this compatible is used in both the Linux and OP-TEE device
trees:
- In OP-TEE, a node is defined in the device tree with the
This patch updates the rproc_ops struct to include an optional
release_fw function.
The release_fw ops is responsible for releasing the remote processor
firmware image. The ops is called in the following cases:
- An error occurs in rproc_start() between the loading of the segments and
the
(-)
---
base-commit: ae90f6a6170d7a7a1aa4fddf664fbd093e3023bc
change-id: 20241025-kunit-qemu-accel-macos-2840e4c2def5
Best regards,
--
Tamir Duberstein
Python 3.13 added os.process_cpu_count as a cross-platform alternative
for the Linux-only os.sched_getaffinity. Use it when it's available and
provide a fallback when it's not.
This allows kunit to run on macOS.
Signed-off-by: Tamir Duberstein
---
tools/testing/kunit/kunit.py | 11 ++-
Currently the set_config callback in the gpio_chip registered by the
pinctrl_moore driver only supports configuring a single parameter on
specific pins (the input debounce of the EINT controller, on pins that
support it), even though many other configurations are already
implemented and available t
On Fri, Oct 25, 2024 at 02:51:29PM -0700, John Hubbard wrote:
> On 10/25/24 2:09 PM, Lorenzo Stoakes wrote:
> > On Fri, Oct 25, 2024 at 01:31:49PM -0700, John Hubbard wrote:
> > > On 10/25/24 12:49 PM, Lorenzo Stoakes wrote:
> > > > On Fri, Oct 25, 2024 at 11:44:34AM -0700, John Hubbard wrote:
> >
Introduce a new IOMMUFD_OBJ_VDEVICE to represent a physical device, i.e.
iommufd_device (idev) object, against an iommufd_viommu (vIOMMU) object in
the VM. This vDEVICE object (and its structure) holds all the information
and attributes in a VM, regarding the device related to the vIOMMU.
As an in
Allow IOMMU driver to use a vIOMMU object that holds a nesting parent
hwpt/domain to allocate a nested domain.
Suggested-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/linu
101 - 158 of 158 matches
Mail list logo