1 #ifndef __LINUX_KVM_X86_H
2 #define __LINUX_KVM_X86_H
5 * KVM x86 specific structures and definitions
10 #include <linux/ioctl.h>
12 struct kvm_memory_alias {
13 __u32 slot; /* this has a different namespace than memory slots */
15 __u64 guest_phys_addr;
17 __u64 target_phys_addr;
20 /* for KVM_GET_IRQCHIP and KVM_SET_IRQCHIP */
21 struct kvm_pic_state {
22 __u8 last_irr; /* edge detection */
23 __u8 irr; /* interrupt request register */
24 __u8 imr; /* interrupt mask register */
25 __u8 isr; /* interrupt service register */
26 __u8 priority_add; /* highest irq priority */
33 __u8 rotate_on_auto_eoi;
34 __u8 special_fully_nested_mode;
35 __u8 init4; /* true if 4 byte init */
36 __u8 elcr; /* PIIX edge/trigger selection */
40 #define KVM_IOAPIC_NUM_PINS 24
41 struct kvm_ioapic_state {
53 __u8 delivery_status:1;
62 } redirtbl[KVM_IOAPIC_NUM_PINS];
65 #define KVM_IRQCHIP_PIC_MASTER 0
66 #define KVM_IRQCHIP_PIC_SLAVE 1
67 #define KVM_IRQCHIP_IOAPIC 2
69 /* for KVM_GET_REGS and KVM_SET_REGS */
71 /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
72 __u64 rax, rbx, rcx, rdx;
73 __u64 rsi, rdi, rsp, rbp;
74 __u64 r8, r9, r10, r11;
75 __u64 r12, r13, r14, r15;
79 /* for KVM_GET_LAPIC and KVM_SET_LAPIC */
80 #define KVM_APIC_REG_SIZE 0x400
81 struct kvm_lapic_state {
82 char regs[KVM_APIC_REG_SIZE];