Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions kvm-ioctls/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Upcoming Release

### Changed

- [[#382]](https://github.com/rust-vmm/kvm/pull/382) `VmFd::enable_cap` and the
`KVM_ENABLE_CAP` ioctl definition are now available on all architectures
instead of only x86_64, s390x and powerpc. aarch64 needs them to enable
`KVM_CAP_ARM_WRITABLE_IMP_ID_REGS` (Linux 6.15), without which writes to the
implementation ID registers (for example `MIDR_EL1` through a VMM CPU
template) fail with EINVAL.

## v0.25.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion kvm-ioctls/src/ioctls/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,9 +1521,9 @@ impl VmFd {
/// // Because an IOAPIC supports 24 pins, that's the reason why this test
/// // picked this number as reference.
/// cap.args[0] = 24;
/// #[cfg(target_arch = "x86_64")]
/// vm.enable_cap(&cap).unwrap();
/// ```
#[cfg(any(target_arch = "x86_64", target_arch = "s390x", target_arch = "powerpc"))]
pub fn enable_cap(&self, cap: &kvm_enable_cap) -> Result<()> {
// SAFETY: The ioctl is safe because we allocated the struct and we know the
// kernel will write exactly the size of the struct.
Expand Down
1 change: 0 additions & 1 deletion kvm-ioctls/src/kvm_ioctls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ ioctl_io_nr!(KVM_SET_TSC_KHZ, KVMIO, 0xa2);
ioctl_io_nr!(KVM_GET_TSC_KHZ, KVMIO, 0xa3);

/* Available with KVM_CAP_ENABLE_CAP */
#[cfg(not(any(target_arch = "aarch64", target_arch = "riscv64")))]
ioctl_iow_nr!(KVM_ENABLE_CAP, KVMIO, 0xa3, kvm_enable_cap);
/* Available with KVM_CAP_SIGNAL_MSI */
#[cfg(any(
Expand Down