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