1 #ifndef KVM__INTERRUPT_H 2 #define KVM__INTERRUPT_H 3 4 #include <inttypes.h> 5 6 #define IVT_BASE 0x0000 7 #define IVT_VECTORS 256 8 9 struct ivt_entry { 10 uint16_t offset; 11 uint16_t segment; 12 } __attribute__((packed)); 13 14 struct interrupt_table { 15 struct ivt_entry entries[IVT_VECTORS]; 16 }; 17 18 void interrupt_table__copy(struct interrupt_table *self, void *dst, unsigned int size); 19 void interrupt_table__setup(struct interrupt_table *self, struct ivt_entry e); 20 21 #endif /* KVM__INTERRUPT_H */ 22