NVIDIA: SAUCE: target/arm: Add sysfs detection for KVM CCA capability#12
Closed
ianm-nv wants to merge 1 commit intoNVIDIA:nvidia_unstable-10.1from
Closed
NVIDIA: SAUCE: target/arm: Add sysfs detection for KVM CCA capability#12ianm-nv wants to merge 1 commit intoNVIDIA:nvidia_unstable-10.1from
ianm-nv wants to merge 1 commit intoNVIDIA:nvidia_unstable-10.1from
Conversation
Add runtime detection of the KVM CCA capability number by reading from the kernel's sysfs module parameter. This allows QEMU to automatically discover the correct capability number without needing version-specific hardcoded values that may become stale. The ARM CCA host patches underwent a naming change from RME to RMI in v11: - v10 (Linux 6.17): KVM_CAP_ARM_RME, sysfs param kvm_cap_arm_rme - v11 (Linux 6.18+): KVM_CAP_ARM_RMI, sysfs param kvm_cap_arm_rmi Detection order: 1. Try v11 sysfs path (/sys/module/kvm/parameters/kvm_cap_arm_rmi) 2. Try v10 sysfs path (/sys/module/kvm/parameters/kvm_cap_arm_rme) 3. Fall back to uname detection for 6.16 dev kernel (capability == 243) 4. Use compile-time KVM_CAP_ARM_RME as last resort This allows the same QEMU binary to work with linux-nvidia-6.16 (dev), linux-nvidia-6.17 (v10 host patches), and linux-nvidia-6.18+ (v11 host patches). Signed-off-by: Ian May <ianm@nvidia.com>
nvmochs
approved these changes
Feb 9, 2026
Collaborator
nvmochs
left a comment
There was a problem hiding this comment.
LGTM!
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
NathanChenNVIDIA
approved these changes
Feb 9, 2026
Collaborator
NathanChenNVIDIA
left a comment
There was a problem hiding this comment.
LGTM
Acked-by: Nathan Chen nathanc@nvidia.com
Collaborator
|
Merged, closing PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add runtime detection of the KVM CCA capability number by reading from the kernel's sysfs module parameter. This allows QEMU to automatically discover the correct capability number without needing version-specific hardcoded values that may become stale.
The ARM CCA host patches underwent a naming change from RME to RMI in v11:
Detection order:
This allows the same QEMU binary to work with linux-nvidia-6.16 (dev), linux-nvidia-6.17 (v10 host patches), and linux-nvidia-6.18+ (v11 host patches).
Here is a ref to the kernel patch that enables the sysfs capability.
I've tested this with the following kernels:
6.16-pset
6.17-nvidia-devel
6.17-nvidia
6.18-nvidia