Add a simple user_data for an input-to-output loopback test.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 13 +
drivers/iommu/iommufd/selftest.c | 19 +++
2 files changed, 32 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.
Hi,
below a few nitpicks in case of a v13.
Le 25/04/2025 à 22:47, Mina Almasry a écrit :
Later patches in the series adds TX net_iovs where there is no pp
associated, so we can't rely on niov->pp->mp_ops to tell what is the
type of the net_iov.
Add a type enum to the net_iov which tells us th
An impl driver might support its own vIOMMU object, as tegra241-cmdqv will
add IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV.
Add a vsmmu_alloc op to give impl a try, upon failure fallback to standard
vsmmu allocation for IOMMU_VIOMMU_TYPE_ARM_SMMUV3.
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-sm
Some simple tests for IOMMUFD_CMD_VCMDQ_ALLOC infrastructure covering the
new iommufd_vcmdq_depend/undepend() helpers.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 3 +
tools/testing/selftests/iommu/iommufd_utils.h | 30 +
drivers/iommu/iommufd/selftes
An IOMMU driver that allocated a vIOMMU may want to revert the allocation,
if it encounters an internal error after the allocation. So, there needs a
destroy helper for drivers to use.
Move iommufd_object_abort() to the driver.c file and the public header, to
introduce common iommufd_struct_destro
The vIOMMU object is designed to represent a slice of an IOMMU HW for its
virtualization features shared with or passed to user space (a VM mostly)
in a way of HW acceleration. This extended the HWPT-based design for more
advanced virtualization feature.
A vCMDQ introduced by this series as a part
To allow IOMMU drivers to allocate own vDEVICE structures, move the struct
iommufd_vdevice to the public header and provide a pair of viommu ops.
The iommufd_vdevice_alloc_ioctl will prioritize the callback function from
the viommu ops, i.e. a driver-allocated vDEVICE.
Reviewed-by: Jason Gunthorp
Extend the existing test_cmd/err_viommu_alloc helpers to accept optional
user data. And add a TEST_F for a loopback test.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 21 +-
tools/testing/selftests/iommu/iommufd.c | 29 +++
...
The CMDQV HW supports a user-space use for virtualization cases. It allows
the VM to issue guest-level TLBI or ATC_INV commands directly to the queue
and executes them without a VMEXIT, as HW will replace the VMID field in a
TLBI command and the SID field in an ATC_INV command with the preset VMID
The current flow of tegra241_cmdqv_remove_vintf() is:
1. For each LVCMDQ, tegra241_vintf_remove_lvcmdq():
a. Disable the LVCMDQ HW
b. Release the LVCMDQ SW resource
2. For current VINTF, tegra241_vintf_hw_deinit():
c. Disable all LVCMDQ HWs
d. Disable VINTF HW
Obviously, the step
Add a new vEVENTQ type for VINTFs that are assigned to the user space.
Simply report the two 64-bit LVCMDQ_ERR_MAPs register values.
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 15 +
.../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c| 22 ++
Repurpose the @__reserved field in the struct iommu_hw_info_arm_smmuv3,
to an HW implementation-defined field @impl.
This will be used by Tegra241 CMDQV implementation on top of a standard
ARM SMMUv3 IOMMU. The @impl will be only valid if @flags is set with an
implementation-defined flag.
Thus in
To simplify the mappings from global VCMDQs to VINTFs' LVCMDQs, the design
chose to do static allocations and mappings in the global reset function.
However, with the user-owned VINTF support, it exposes a security concern:
if user space VM only wants one LVCMDQ for a VINTF, statically mapping two
Extend the loopback test to a new mmap page.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h| 4 +++
drivers/iommu/iommufd/selftest.c| 37 ++---
tools/testing/selftests/iommu/iommufd.c | 5
3 files changed, 42 insertions(+), 4 deletions
With the introduction of the new object and its infrastructure, update the
doc to reflect that.
Signed-off-by: Nicolin Chen
---
Documentation/userspace-api/iommufd.rst | 14 ++
1 file changed, 14 insertions(+)
diff --git a/Documentation/userspace-api/iommufd.rst
b/Documentation/use
For vIOMMU passing through HW resources to user space (VMs), add an mmap
infrastructure to map a region of hardware MMIO pages.
Maintain an mt_mmap per ictx for validations. To allow IOMMU drivers to
add and delete mmappable regions to/from the mt_mmap, add a pair of new
helpers: iommufd_ctx_alloc
Introduce a new IOMMUFD_CMD_VCMDQ_ALLOC ioctl for user space to allocate
a vCMDQ for a vIOMMU object. Simply increase the refcount of the vIOMMU.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 2 +
include/uapi/linux/iommufd.h| 41 +++
drivers/iomm
NVIDIA Virtual Command Queue is one of the iommufd users exposing vIOMMU
features to user space VMs. Its hardware has a strict rule when mapping
and unmapping multiple global CMDQVs to/from a VM-owned VINTF, requiring
mappings in ascending order and unmappings in descending order.
The tegra241-cmd
The new vCMDQ object will be added for HW to access the guest memory for a
HW-accelerated virtualization feature. It needs to ensure the guest memory
pages are pinned when HW accesses them and they are contiguous in physical
address space.
This is very like the existing iommufd_access_pin_pages()
Similar to the iommu_copy_struct_from_user helper receiving data from the
user space, add an iommu_copy_struct_to_user helper to report output data
back to the user space data pointer.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 40 ++
The new type of vIOMMU for tegra241-cmdqv driver needs a driver-specific
user data. So, add data_len/uptr to the iommu_viommu_alloc uAPI and pass
it in via the viommu_alloc iommu op.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 6 ++
drivers/
The new type of vIOMMU for tegra241-cmdqv needs to pass in a driver-level
data structure from user space via iommufd, so add a user_data to the op.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 ++-
include/linux/iommu.h
Adds a framework to hold the initial exec.c and binfmt_elf.c
kernel-docs. Updates scripts/kernel-doc to allow leading whitespace so
that embedded "DOC:" tags can be found that aren't at the start of a
line so that in-function documentation can be found, like that recently
marked up in binfmt_elf.c[
We should not enable netmem TX for drivers that don't declare support.
Check for driver netmem TX support during devmem TX binding and fail if
the driver does not have the functionality.
Check for driver support in validate_xmit_skb as well.
Signed-off-by: Mina Almasry
Acked-by: Stanislav Fomic
Later patches in the series adds TX net_iovs where there is no pp
associated, so we can't rely on niov->pp->mp_ops to tell what is the
type of the net_iov.
Add a type enum to the net_iov which tells us the net_iov type.
Signed-off-by: Mina Almasry
---
v8:
- Since io_uring zcrx is now in net-ne
Currently net_iovs support only pp ref counts, and do not support a
page ref equivalent.
This is fine for the RX path as net_iovs are used exclusively with the
pp and only pp refcounting is needed there. The TX path however does not
use pp ref counts, thus, support for get_page/put_page equivalent
Add support for devmem TX in ncdevmem.
This is a combination of the ncdevmem from the devmem TCP series RFCv1
which included the TX path, and work by Stan to include the netlink API
and refactored on top of his generic memory_provider support.
Signed-off-by: Mina Almasry
Signed-off-by: Stanislav
Use netmem_dma_*() helpers in gve_tx_dqo.c DQO-RDA paths to
enable netmem TX support in that mode.
Declare support for netmem TX in GVE DQO-RDA mode.
Signed-off-by: Mina Almasry
Acked-by: Harshitha Ramamurthy
---
v11:
- Fix whitespace (Harshitha)
v10:
- Move setting dev->netmem_tx to right a
Drivers need to make sure not to pass netmem dma-addrs to the
dma-mapping API in order to support netmem TX.
Add helpers and netmem_dma_*() helpers that enables special handling of
netmem dma-addrs that drivers can use.
Document in netmem.rst what drivers need to do to support netmem TX.
Signed-
Add documentation outlining the usage and details of the devmem TCP TX
API.
Signed-off-by: Mina Almasry
Acked-by: Stanislav Fomichev
---
v5:
- Address comments from Stan and Bagas
v4:
- Mention SO_BINDTODEVICE is recommended (me/Pavel).
v2:
- Update documentation for iov_base is the dmabuf o
Augment dmabuf binding to be able to handle TX. Additional to all the RX
binding, we also create tx_vec needed for the TX path.
Provide API for sendmsg to be able to send dmabufs bound to this device:
- Provide a new dmabuf_tx_cmsg which includes the dmabuf to send from.
- MSG_ZEROCOPY with SCM_D
From: Stanislav Fomichev
Add bind-tx netlink call to attach dmabuf for TX; queue is not
required, only ifindex and dmabuf fd for attachment.
Signed-off-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v3:
- Fix ynl-regen.sh error (Simon).
---
Documentation/netlink/specs/netdev.yaml |
v12:
https://lore.kernel.org/netdev/20250423031117.907681-1-almasrym...@google.com/
No changes in v12, just restored the selftests patch I accidentally dropped in
v11
v11:
https://lore.kernel.org/netdev/20250423031117.907681-1-almasrym...@google.com/
Addressed a couple of nits and co
Mention how to include initramfs when building the kernel
Signed-off-by: Ann Yun
---
Documentation/arch/openrisc/openrisc_port.rst | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/arch/openrisc/openrisc_port.rst
b/Documentation/arch/openrisc/openrisc_port.rst
index a8f307a3
On Fri, Apr 25, 2025 at 01:42:44PM +0200, Radim Krčmář wrote:
2025-04-24T11:16:19-07:00, Deepak Gupta :
On Thu, Apr 24, 2025 at 03:36:54PM +0200, Radim Krčmář wrote:
2025-04-23T21:44:09-07:00, Deepak Gupta :
On Thu, Apr 10, 2025 at 11:45:58AM +0200, Radim Krčmář wrote:
2025-03-14T14:39:31-07:
2025-04-24T11:16:19-07:00, Deepak Gupta :
> On Thu, Apr 24, 2025 at 03:36:54PM +0200, Radim Krčmář wrote:
>>2025-04-23T21:44:09-07:00, Deepak Gupta :
>>> On Thu, Apr 10, 2025 at 11:45:58AM +0200, Radim Krčmář wrote:
2025-03-14T14:39:31-07:00, Deepak Gupta :
> diff --git a/arch/riscv/include
2025-04-24T11:03:59-07:00, Deepak Gupta :
> On Thu, Apr 24, 2025 at 02:16:32PM +0200, Radim Krčmář wrote:
>>2025-04-23T17:23:56-07:00, Deepak Gupta :
>>> On Thu, Apr 10, 2025 at 01:04:39PM +0200, Radim Krčmář wrote:
2025-03-14T14:39:24-07:00, Deepak Gupta :
> diff --git a/arch/riscv/kernel/
2025-04-24T10:56:34-07:00, Deepak Gupta :
> On Thu, Apr 24, 2025 at 01:52:43PM +0200, Radim Krčmář wrote:
>>2025-04-23T17:00:29-07:00, Deepak Gupta :
>>> On Thu, Apr 10, 2025 at 01:04:39PM +0200, Radim Krčmář wrote:
2025-03-14T14:39:24-07:00, Deepak Gupta :
> diff --git a/arch/riscv/include
On Thu, Apr 24, 2025 at 07:31:49PM +0200, Clément Léger wrote:
> A few parenthesis in check for SBI version/extension were useless,
> remove them.
>
> Signed-off-by: Clément Léger
> ---
> arch/riscv/kernel/sbi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch
39 matches
Mail list logo