diff options
Diffstat (limited to 'kvm/src/lib.rs')
-rw-r--r-- | kvm/src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kvm/src/lib.rs b/kvm/src/lib.rs index b900505..66ebd20 100644 --- a/kvm/src/lib.rs +++ b/kvm/src/lib.rs @@ -1121,6 +1121,9 @@ pub enum VcpuExit { size: usize, data: [u8; 8], }, + IoapicEoi { + vector: u8, + }, Unknown, Exception, Hypercall, @@ -1811,6 +1814,12 @@ impl RunnableVcpu { Ok(VcpuExit::MmioRead { address, size }) } } + KVM_EXIT_IOAPIC_EOI => { + // Safe because the exit_reason (which comes from the kernel) told us which + // union field to use. + let vector = unsafe { run.__bindgen_anon_1.eoi.vector }; + Ok(VcpuExit::IoapicEoi { vector }) + } KVM_EXIT_UNKNOWN => Ok(VcpuExit::Unknown), KVM_EXIT_EXCEPTION => Ok(VcpuExit::Exception), KVM_EXIT_HYPERCALL => Ok(VcpuExit::Hypercall), |