What problem does it solve? Building a virtual machine monitor from scratch on Linux KVM involves dozens of subtle kernel API rules — memory slot registration, IRQ chip ordering, vCPU reset state, snapshot restore order — where mistakes cause silent corruption or triple faults. This Skill encodes the proven implementation order, safety rules, and hard-won pitfalls for the Entangled Desktop KVM machine layer so work on vmm-core and machine-x86 stays correct. ## Core Features & Use Cases - VM and vCPU bring-up guidance: Covers create_vm, KVM_SET_USER_MEMORY_REGION from the E820 map, in-kernel IRQ chip and PIT2 creation before vCPUs, CPUID filtering, and long-mode register setup per the Linux boot protocol. - KVM_RUN loop and lifecycle rules: Explicit VM exit matching, clean shutdown via KVM_CAP_IMMEDIATE_EXIT, crash reporting through VmState, and leak-free create/destroy cycles. - Advanced hypervisor mechanics: Documents vCPU in-place reset ordering (ADR-0005), snapshot/restore of vCPU and in-kernel IRQ chips (ADR-0006), dirty page logging limitations, and virtio shared-memory window slot management. - Use Case: When adding a new KVM capability or debugging a guest that triple-faults after reboot, load this Skill to get the exact ioctl ordering and safety constraints instead of rediscovering them from kernel source. ## Quick Start Load this skill before modifying any code in crates/vmm-core or crates/machine-x86 that touches kvm-ioctls or kvm-bindings.