diff options
author | Jerone Young <jyoung5@us.ibm.com> | 2007-11-19 18:06:32 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:07 -0500 |
commit | da1386a5bc43fa0faf17089a68c2991cf1d526c8 (patch) | |
tree | f8b14c46567ce4dd81bdc513a0bb81422099fe03 /include/asm-x86/kvm.h | |
parent | f6a40e3bdf5fe0a7d7d7f2dbc5b10158fbdad968 (diff) |
KVM: Portability: Move x86 pic strutctures
This patch moves structures:
kvm_pic_state
kvm_ioapic_state
to inclue/asm-x86/kvm.h.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/asm-x86/kvm.h')
-rw-r--r-- | include/asm-x86/kvm.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h index 37cf8e995c83..80752bccc756 100644 --- a/include/asm-x86/kvm.h +++ b/include/asm-x86/kvm.h | |||
@@ -17,4 +17,53 @@ struct kvm_memory_alias { | |||
17 | __u64 target_phys_addr; | 17 | __u64 target_phys_addr; |
18 | }; | 18 | }; |
19 | 19 | ||
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 */ | ||
27 | __u8 irq_base; | ||
28 | __u8 read_reg_select; | ||
29 | __u8 poll; | ||
30 | __u8 special_mask; | ||
31 | __u8 init_state; | ||
32 | __u8 auto_eoi; | ||
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 */ | ||
37 | __u8 elcr_mask; | ||
38 | }; | ||
39 | |||
40 | #define KVM_IOAPIC_NUM_PINS 24 | ||
41 | struct kvm_ioapic_state { | ||
42 | __u64 base_address; | ||
43 | __u32 ioregsel; | ||
44 | __u32 id; | ||
45 | __u32 irr; | ||
46 | __u32 pad; | ||
47 | union { | ||
48 | __u64 bits; | ||
49 | struct { | ||
50 | __u8 vector; | ||
51 | __u8 delivery_mode:3; | ||
52 | __u8 dest_mode:1; | ||
53 | __u8 delivery_status:1; | ||
54 | __u8 polarity:1; | ||
55 | __u8 remote_irr:1; | ||
56 | __u8 trig_mode:1; | ||
57 | __u8 mask:1; | ||
58 | __u8 reserve:7; | ||
59 | __u8 reserved[4]; | ||
60 | __u8 dest_id; | ||
61 | } fields; | ||
62 | } redirtbl[KVM_IOAPIC_NUM_PINS]; | ||
63 | }; | ||
64 | |||
65 | #define KVM_IRQCHIP_PIC_MASTER 0 | ||
66 | #define KVM_IRQCHIP_PIC_SLAVE 1 | ||
67 | #define KVM_IRQCHIP_IOAPIC 2 | ||
68 | |||
20 | #endif | 69 | #endif |