Skip to content

Conversation

@modules-kpd-app
Copy link

Pull request for series with
subject: rust: extend module! macro with integer parameter support
version: 5
url: https://patchwork.kernel.org/project/linux-modules/list/?series=930409

@modules-kpd-app
Copy link
Author

Upstream branch: 48ecfdd
series: https://patchwork.kernel.org/project/linux-modules/list/?series=930409
version: 5

@modules-kpd-app
Copy link
Author

Upstream branch: 053842e
series: https://patchwork.kernel.org/project/linux-modules/list/?series=930409
version: 5

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from e305a0e to 5d58d7a Compare February 4, 2025 12:19
@modules-kpd-app
Copy link
Author

Upstream branch: 053842e
series: https://patchwork.kernel.org/project/linux-modules/list/?series=930409
version: 5

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 5d58d7a to 219ed68 Compare February 4, 2025 12:56
@modules-kpd-app
Copy link
Author

Upstream branch: 053842e
series: https://patchwork.kernel.org/project/linux-modules/list/?series=932676
version: 6

@modules-kpd-app modules-kpd-app bot added V6 and removed V5 labels Feb 17, 2025
@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 219ed68 to a2786a0 Compare February 17, 2025 09:55
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=932676
version: 6

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from a2786a0 to 7c8856b Compare February 17, 2025 10:02
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=932676
version: 6

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 7c8856b to af7e5ae Compare February 17, 2025 10:32
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=935096
version: 7

@modules-kpd-app modules-kpd-app bot added V7 and removed V6 labels Feb 18, 2025
@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from af7e5ae to 385015a Compare February 18, 2025 13:06
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=935096
version: 7

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 385015a to 99c380e Compare February 21, 2025 15:57
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=935096
version: 7

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 99c380e to 32fab5f Compare February 21, 2025 16:01
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=935096
version: 7

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 32fab5f to aaccfcd Compare February 21, 2025 16:17
@modules-kpd-app
Copy link
Author

Upstream branch: afa9286
series: https://patchwork.kernel.org/project/linux-modules/list/?series=935096
version: 7

@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from aaccfcd to 4bb3b4a Compare February 21, 2025 16:21
@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


8 similar comments
@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


@modules-kpd-app
Copy link
Author

Upstream branch: af1ccf5
series: https://patchwork.kernel.org/project/linux-modules/list/?series=979688
version: 15

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-modules/list/?series=979688
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: rust: sync: add `SetOnce`
Patch failed at 0001 rust: sync: add `SetOnce`'
  stderr: 'error: sha1 information is lacking or useless (rust/kernel/sync.rs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:


dkruces pushed a commit that referenced this pull request Sep 22, 2025
…ostcopy

When you run a KVM guest with vhost-net and migrate that guest to
another host, and you immediately enable postcopy after starting the
migration, there is a big chance that the network connection of the
guest won't work anymore on the destination side after the migration.

With a debug kernel v6.16.0, there is also a call trace that looks
like this:

 FAULT_FLAG_ALLOW_RETRY missing 881
 CPU: 6 UID: 0 PID: 549 Comm: kworker/6:2 Kdump: loaded Not tainted 6.16.0 #56 NONE
 Hardware name: IBM 3931 LA1 400 (LPAR)
 Workqueue: events irqfd_inject [kvm]
 Call Trace:
  [<00003173cbecc634>] dump_stack_lvl+0x104/0x168
  [<00003173cca69588>] handle_userfault+0xde8/0x1310
  [<00003173cc756f0c>] handle_pte_fault+0x4fc/0x760
  [<00003173cc759212>] __handle_mm_fault+0x452/0xa00
  [<00003173cc7599ba>] handle_mm_fault+0x1fa/0x6a0
  [<00003173cc73409a>] __get_user_pages+0x4aa/0xba0
  [<00003173cc7349e8>] get_user_pages_remote+0x258/0x770
  [<000031734be6f052>] get_map_page+0xe2/0x190 [kvm]
  [<000031734be6f910>] adapter_indicators_set+0x50/0x4a0 [kvm]
  [<000031734be7f674>] set_adapter_int+0xc4/0x170 [kvm]
  [<000031734be2f268>] kvm_set_irq+0x228/0x3f0 [kvm]
  [<000031734be27000>] irqfd_inject+0xd0/0x150 [kvm]
  [<00003173cc00c9ec>] process_one_work+0x87c/0x1490
  [<00003173cc00dda6>] worker_thread+0x7a6/0x1010
  [<00003173cc02dc36>] kthread+0x3b6/0x710
  [<00003173cbed2f0c>] __ret_from_fork+0xdc/0x7f0
  [<00003173cdd737ca>] ret_from_fork+0xa/0x30
 3 locks held by kworker/6:2/549:
  #0: 00000000800bc958 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7ee/0x1490
  #1: 000030f3d527fbd0 ((work_completion)(&irqfd->inject)){+.+.}-{0:0}, at: process_one_work+0x81c/0x1490
  #2: 00000000f99862b0 (&mm->mmap_lock){++++}-{3:3}, at: get_map_page+0xa8/0x190 [kvm]

The "FAULT_FLAG_ALLOW_RETRY missing" indicates that handle_userfaultfd()
saw a page fault request without ALLOW_RETRY flag set, hence userfaultfd
cannot remotely resolve it (because the caller was asking for an immediate
resolution, aka, FAULT_FLAG_NOWAIT, while remote faults can take time).
With that, get_map_page() failed and the irq was lost.

We should not be strictly in an atomic environment here and the worker
should be sleepable (the call is done during an ioctl from userspace),
so we can allow adapter_indicators_set() to just sleep waiting for the
remote fault instead.

Link: https://issues.redhat.com/browse/RHEL-42486
Signed-off-by: Peter Xu <peterx@redhat.com>
[thuth: Assembled patch description and fixed some cosmetical issues]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Fixes: f654706 ("KVM: s390/interrupt: do not pin adapter interrupt pages")
[frankja: Added fixes tag]
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
@modules-kpd-app modules-kpd-app bot force-pushed the modules-next_base branch 2 times, most recently from e00514b to 0299e02 Compare October 22, 2025 10:24
Andreas Hindborg added 7 commits October 22, 2025 04:27
Introduce the `SetOnce` type, a container that can only be written once.
The container uses an internal atomic to synchronize writes to the internal
value.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Add the trait `ParseInt` for parsing string representations of integers
where the string representations are optionally prefixed by a radix
specifier. Implement the trait for the primitive integer types.

Suggested-by: Benno Lossin <benno.lossin@proton.me>
Tested-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Add types and traits for interfacing the C moduleparam API.

Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
When we add parameter support to the module macro, we want to be able to
pass a reference to `ModuleInfo` to a helper function. That is not possible
when we move out of the local `modinfo`. So change the function to access
the local via reference rather than value.

Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Allow module parameters to be declared in the rust `module!` macro.

Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Showcase the rust module parameter support by adding a module parameter to
the `rust_minimal` sample.

Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
The module subsystem people agreed to maintain rust support for modules
[1]. Thus, add entries for relevant files to modules entry in MAINTAINERS.

Link: https://lore.kernel.org/all/0d9e596a-5316-4e00-862b-fd77552ae4b5@suse.com/ [1]

Acked-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
@modules-kpd-app
Copy link
Author

Upstream branch: 5eb4b9a
series: https://patchwork.kernel.org/project/linux-modules/list/?series=1005651
version: 18

@modules-kpd-app modules-kpd-app bot added V18 and removed V8 labels Oct 22, 2025
@modules-kpd-app modules-kpd-app bot force-pushed the series/923700=>modules-next branch from 342e527 to 83c76b9 Compare October 22, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants