xref: /kvmtool/x86/include/kvm/interrupt.h (revision 68967fcf0dfae9be4d57804d183e27a66a737463)
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 void ivt_reset(void);
15 void ivt_copy_table(void *dst, unsigned int size);
16 struct ivt_entry * const ivt_get_entry(unsigned int n);
17 void ivt_set_entry(struct ivt_entry e, unsigned int n);
18 void ivt_set_all(struct ivt_entry e);
19 
20 #endif /* KVM__INTERRUPT_H */
21