Skip to content

Commit b00ead3

Browse files
committed
kvm-ioctls: Enable KVM_ENABLE_CAP on all architectures
Remove conditional compilation of KVM_ENABLE_CAP definition Signed-off-by: David Kleymann <[email protected]>
1 parent 231dc89 commit b00ead3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

kvm-ioctls/src/ioctls/vm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,12 +1397,12 @@ impl VmFd {
13971397
/// extern crate kvm_bindings;
13981398
///
13991399
/// # use kvm_ioctls::Kvm;
1400-
/// use kvm_bindings::{KVM_CAP_SPLIT_IRQCHIP, kvm_enable_cap};
1400+
/// use kvm_bindings::{KVM_CAP_ENABLE_CAP_VM, kvm_enable_cap};
14011401
///
14021402
/// let kvm = Kvm::new().unwrap();
14031403
/// let vm = kvm.create_vm().unwrap();
14041404
/// let mut cap: kvm_enable_cap = Default::default();
1405-
/// cap.cap = KVM_CAP_SPLIT_IRQCHIP;
1405+
/// cap.cap = KVM_CAP_ENABLE_CAP_VM;
14061406
/// // As per the KVM documentation, KVM_CAP_SPLIT_IRQCHIP only emulates
14071407
/// // the local APIC in kernel, expecting that a userspace IOAPIC will
14081408
/// // be implemented by the VMM.

kvm-ioctls/src/kvm_ioctls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ ioctl_io_nr!(KVM_GET_TSC_KHZ, KVMIO, 0xa3);
224224
ioctl_io_nr!(KVM_RESET_DIRTY_RINGS, KVMIO, 0xc7);
225225

226226
/* Available with KVM_CAP_ENABLE_CAP */
227-
#[cfg(not(any(target_arch = "aarch64", target_arch = "riscv64")))]
228227
ioctl_iow_nr!(KVM_ENABLE_CAP, KVMIO, 0xa3, kvm_enable_cap);
229228
/* Available with KVM_CAP_SIGNAL_MSI */
230229
#[cfg(any(

0 commit comments

Comments
 (0)