aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJerone Young <jyoung5@us.ibm.com>2007-11-19 18:06:32 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:07 -0500
commitda1386a5bc43fa0faf17089a68c2991cf1d526c8 (patch)
treef8b14c46567ce4dd81bdc513a0bb81422099fe03 /include
parentf6a40e3bdf5fe0a7d7d7f2dbc5b10158fbdad968 (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')
-rw-r--r--include/asm-x86/kvm.h49
-rw-r--r--include/linux/kvm.h48
2 files changed, 49 insertions, 48 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 */
21struct 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
41struct 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
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index d09dd5dd5493..1779c3d3bdc9 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -48,54 +48,6 @@ struct kvm_irq_level {
48 __u32 level; 48 __u32 level;
49}; 49};
50 50
51/* for KVM_GET_IRQCHIP and KVM_SET_IRQCHIP */
52struct kvm_pic_state {
53 __u8 last_irr; /* edge detection */
54 __u8 irr; /* interrupt request register */
55 __u8 imr; /* interrupt mask register */
56 __u8 isr; /* interrupt service register */
57 __u8 priority_add; /* highest irq priority */
58 __u8 irq_base;
59 __u8 read_reg_select;
60 __u8 poll;
61 __u8 special_mask;
62 __u8 init_state;
63 __u8 auto_eoi;
64 __u8 rotate_on_auto_eoi;
65 __u8 special_fully_nested_mode;
66 __u8 init4; /* true if 4 byte init */
67 __u8 elcr; /* PIIX edge/trigger selection */
68 __u8 elcr_mask;
69};
70
71#define KVM_IOAPIC_NUM_PINS 24
72struct kvm_ioapic_state {
73 __u64 base_address;
74 __u32 ioregsel;
75 __u32 id;
76 __u32 irr;
77 __u32 pad;
78 union {
79 __u64 bits;
80 struct {
81 __u8 vector;
82 __u8 delivery_mode:3;
83 __u8 dest_mode:1;
84 __u8 delivery_status:1;
85 __u8 polarity:1;
86 __u8 remote_irr:1;
87 __u8 trig_mode:1;
88 __u8 mask:1;
89 __u8 reserve:7;
90 __u8 reserved[4];
91 __u8 dest_id;
92 } fields;
93 } redirtbl[KVM_IOAPIC_NUM_PINS];
94};
95
96#define KVM_IRQCHIP_PIC_MASTER 0
97#define KVM_IRQCHIP_PIC_SLAVE 1
98#define KVM_IRQCHIP_IOAPIC 2
99 51
100struct kvm_irqchip { 52struct kvm_irqchip {
101 __u32 chip_id; 53 __u32 chip_id;