Disallow MSR read/writes#991
Draft
ludfjig wants to merge 2 commits into
Draft
Conversation
ludfjig
force-pushed
the
reset2
branch
7 times, most recently
from
October 31, 2025 00:29
aeca04d to
968f2f4
Compare
ludfjig
force-pushed
the
reset2
branch
3 times, most recently
from
December 8, 2025 18:42
e859ff9 to
e793129
Compare
ludfjig
force-pushed
the
reset2
branch
5 times, most recently
from
February 13, 2026 23:16
8f55249 to
3bb2294
Compare
ludfjig
force-pushed
the
reset2
branch
2 times, most recently
from
February 18, 2026 19:27
032168d to
c0383dd
Compare
ludfjig
force-pushed
the
reset2
branch
6 times, most recently
from
July 11, 2026 07:10
2e98073 to
089227c
Compare
ludfjig
force-pushed
the
reset2
branch
7 times, most recently
from
July 13, 2026 22:25
d98fa0d to
db219bc
Compare
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
ludfjig
force-pushed
the
reset2
branch
10 times, most recently
from
July 16, 2026 20:30
4cef9d5 to
4b942f8
Compare
Guest reads and writes of model-specific registers are denied by default. SandboxConfiguration::allow_msr and allow_msrs permit specific MSRs. KVM enforces the boundary with a deny-by-default MSR filter. MSHV and WHP have no per-MSR filter, so a guest access to an unallowed MSR faults directly. On those backends isolation comes from capturing the retained MSR state at VM creation and resetting it on restore. Captured MSR state persists through OCI snapshots and reloads on restore. A denied access poisons the sandbox. KVM reports the MSR index. MSHV and WHP surface a guest general protection fault. See docs/msr.md. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
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.
Disallows reading/writing MSRs in the guest. The goal is to prevent guest state to persist across snapshot-restores.
Will mark ready for review once KVM releases new version, which should include newly added
KVM_X86_SET_MSR_FILTERvm ioctl that this PR depends on, see rust-vmm/kvm#359