Skip to content

Add support for KVM_REINJECT_CONTROL ioctl on x86_64#365

Open
karuboniru wants to merge 1 commit intorust-vmm:mainfrom
karuboniru:main
Open

Add support for KVM_REINJECT_CONTROL ioctl on x86_64#365
karuboniru wants to merge 1 commit intorust-vmm:mainfrom
karuboniru:main

Conversation

@karuboniru
Copy link

This commit introduces support for the KVM_REINJECT_CONTROL VM ioctl on x86_64, along with a convenience method disable_pit_reinjection on VmFd for easier management of PIT reinjection settings.

Summary of the PR

Enable user to disable PIT reinjection, which accoding to kernel doc should be always set when possible.

pit_reinject = 0 (!reinject mode) is recommended, unless running an old operating system that uses the PIT for timing (e.g. Linux 2.4.x).

This will help fixing containers/libkrun#498

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

This commit introduces support for the `KVM_REINJECT_CONTROL`
VM ioctl on x86_64, along with a convenience method
`disable_pit_reinjection` on 'VmFd` for easier management
of PIT reinjection settings.

Signed-off-by: Karuboniru <yanqiyu01@gmail.com>
@roypat
Copy link
Member

roypat commented Jan 12, 2026

I guess we need a #[allow(confusable_idents)] in the bindings.rs files. What the hell even is that lint 😒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants