Re: [PATCH 06/16] KVM: x86: Widen the plane vCPU fd ioctl allowlist
From: Paolo Bonzini
Date: Wed Nov 18 2026 - 12:58:58 EST
On 11/11/26 23:29, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
A VMM that puts an initial VTL context on a higher plane cannot finish
the job through the plane vCPU's fd. kvm_arch_is_vcpu_plane_ioctl()
refuses the ioctls it needs, while the one capability ioctl it does
admit, KVM_ENABLE_CAP, reaches *every* vCPU capability handler.
- KVM_GET/SET_MP_STATE: a plane vCPU for an AP starts in
wait-for-INIT like any non-boot x86 vCPU, and nothing ever sends
INIT/SIPI to the higher plane of an AP. The VMM has to mark it
runnable itself.
- KVM_SET_GUEST_DEBUG: single-step and breakpoints on a non-zero
plane. The debug exits surface through the plane-0 KVM_RUN loop
like any other plane exit.
- KVM_X86_SETUP_MCE: mcg_cap is per vCPU and every twin starts with
the KVM_MAX_MCE_BANKS default, so programming plane 0 alone leaves
the planes disagreeing. Hyper-V shares MCG state across VTLs.
- KVM_ENABLE_CAP: accept only the audited capabilities on a plane fd,
the SynIC pair and the two CPUID-enforcement toggles, which change
state that each twin keeps separately. Anything else gets -EINVAL, as
non-allowlisted ioctls already do. The nested paths behind
enlightened VMCS and direct TLB flush have never been audited for
plane_level > 0, and without the filter any future vCPU cap would
work on planes without anyone having decided that it should.
Not sure about KVM_ENABLE_CAP, the other seem sane.
BTW at some point I'll rewrite these commit messages, they're infuriating...
Paolo