{"record":{"id":"70aa8c84686133a2","repo":"firecracker-microvm/firecracker","slug":"irq-chip-not-set","errorCode":null,"errorMessage":"IRQ chip not set","messagePattern":"IRQ chip not set","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/vmm/src/arch/aarch64/vm.rs","lineNumber":120,"sourceCode":"        // On aarch64, the vCPUs need to be created (i.e call KVM_CREATE_VCPU) before setting up the\n        // IRQ chip because the `KVM_CREATE_VCPU` ioctl will return error if the IRQCHIP\n        // was already initialized.\n        // Search for `kvm_arch_vcpu_create` in arch/arm/kvm/arm.c.\n        self.setup_irqchip(nr_vcpus)\n    }\n\n    /// Creates the GIC (Global Interrupt Controller).\n    pub fn setup_irqchip(&mut self, vcpu_count: u8) -> Result<(), KvmVmError> {\n        self.irqchip_handle = Some(\n            crate::arch::aarch64::gic::create_gic(self.fd(), vcpu_count.into(), None)\n                .map_err(KvmVmError::VmCreateGIC)?,\n        );\n        Ok(())\n    }\n\n    /// Gets a reference to the irqchip of the VM.\n    pub fn get_irqchip(&self) -> &crate::arch::aarch64::gic::GICDevice {\n        self.irqchip_handle.as_ref().expect(\"IRQ chip not set\")\n    }\n\n    /// Saves and returns the KVM VM state.\n    pub fn save_state(&self, mpidrs: &[u64]) -> Result<VmState, KvmVmError> {\n        Ok(VmState {\n            memory: self.common.guest_memory.describe(),\n            gic: self\n                .get_irqchip()\n                .save_device(mpidrs)\n                .map_err(KvmVmError::SaveGic)?,\n            resource_allocator: self.resource_allocator().save(),\n        })\n    }\n\n    /// Restore the KVM VM state\n    ///\n    /// # Errors\n    ///","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/firecracker-microvm/firecracker/blob/cc535f035f3828b2c5bfc85276c5d394022ed220/src/vmm/src/arch/aarch64/vm.rs#L102-L138","documentation":"Error \"IRQ chip not set\" thrown in firecracker-microvm/firecracker.","triggerScenarios":"Thrown at src/vmm/src/arch/aarch64/vm.rs:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the GIC (IRQ chip) is created before the operation requiring it is invoked.","Create the IRQ chip during VM setup before attaching devices that raise interrupts."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cc535f035f3828b2c5bfc85276c5d394022ed220","analyzedAt":"2026-08-19T05:27:02.517Z","contentChangedAt":"2026-08-19T05:27:02.517Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}