2 #ifndef __XEN_PUBLIC_PHYSDEV_H__
3 #define __XEN_PUBLIC_PHYSDEV_H__
6 * Prototype for this hypercall is:
7 * int physdev_op(int cmd, void *args)
8 * @cmd == PHYSDEVOP_??? (physdev operation).
9 * @args == Operation-specific extra arguments (NULL if none).
13 * Notify end-of-interrupt (EOI) for the specified IRQ.
14 * @arg == pointer to physdev_eoi structure.
16 #define PHYSDEVOP_eoi 12
21 typedef struct physdev_eoi physdev_eoi_t;
22 DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t);
25 * Query the status of an IRQ line.
26 * @arg == pointer to physdev_irq_status_query structure.
28 #define PHYSDEVOP_irq_status_query 5
29 struct physdev_irq_status_query {
33 uint32_t flags; /* XENIRQSTAT_* */
35 typedef struct physdev_irq_status_query physdev_irq_status_query_t;
36 DEFINE_XEN_GUEST_HANDLE(physdev_irq_status_query_t);
38 /* Need to call PHYSDEVOP_eoi when the IRQ has been serviced? */
39 #define _XENIRQSTAT_needs_eoi (0)
40 #define XENIRQSTAT_needs_eoi (1U<<_XENIRQSTAT_needs_eoi)
42 /* IRQ shared by multiple guests? */
43 #define _XENIRQSTAT_shared (1)
44 #define XENIRQSTAT_shared (1U<<_XENIRQSTAT_shared)
47 * Set the current VCPU's I/O privilege level.
48 * @arg == pointer to physdev_set_iopl structure.
50 #define PHYSDEVOP_set_iopl 6
51 struct physdev_set_iopl {
55 typedef struct physdev_set_iopl physdev_set_iopl_t;
56 DEFINE_XEN_GUEST_HANDLE(physdev_set_iopl_t);
59 * Set the current VCPU's I/O-port permissions bitmap.
60 * @arg == pointer to physdev_set_iobitmap structure.
62 #define PHYSDEVOP_set_iobitmap 7
63 struct physdev_set_iobitmap {
68 typedef struct physdev_set_iobitmap physdev_set_iobitmap_t;
69 DEFINE_XEN_GUEST_HANDLE(physdev_set_iobitmap_t);
72 * Read or write an IO-APIC register.
73 * @arg == pointer to physdev_apic structure.
75 #define PHYSDEVOP_apic_read 8
76 #define PHYSDEVOP_apic_write 9
79 unsigned long apic_physbase;
84 typedef struct physdev_apic physdev_apic_t;
85 DEFINE_XEN_GUEST_HANDLE(physdev_apic_t);
88 * Allocate or free a physical upcall vector for the specified IRQ line.
89 * @arg == pointer to physdev_irq structure.
91 #define PHYSDEVOP_alloc_irq_vector 10
92 #define PHYSDEVOP_free_irq_vector 11
99 typedef struct physdev_irq physdev_irq_t;
100 DEFINE_XEN_GUEST_HANDLE(physdev_irq_t);
103 * Argument to physdev_op_compat() hypercall. Superceded by new physdev_op()
104 * hypercall since 0x00030202.
109 struct physdev_irq_status_query irq_status_query;
110 struct physdev_set_iopl set_iopl;
111 struct physdev_set_iobitmap set_iobitmap;
112 struct physdev_apic apic_op;
113 struct physdev_irq irq_op;
116 typedef struct physdev_op physdev_op_t;
117 DEFINE_XEN_GUEST_HANDLE(physdev_op_t);
120 * Notify that some PIRQ-bound event channels have been unmasked.
121 * ** This command is obsolete since interface version 0x00030202 and is **
122 * ** unsupported by newer versions of Xen. **
124 #define PHYSDEVOP_IRQ_UNMASK_NOTIFY 4
127 * These all-capitals physdev operation names are superceded by the new names
128 * (defined above) since interface version 0x00030202.
130 #define PHYSDEVOP_IRQ_STATUS_QUERY PHYSDEVOP_irq_status_query
131 #define PHYSDEVOP_SET_IOPL PHYSDEVOP_set_iopl
132 #define PHYSDEVOP_SET_IOBITMAP PHYSDEVOP_set_iobitmap
133 #define PHYSDEVOP_APIC_READ PHYSDEVOP_apic_read
134 #define PHYSDEVOP_APIC_WRITE PHYSDEVOP_apic_write
135 #define PHYSDEVOP_ASSIGN_VECTOR PHYSDEVOP_alloc_irq_vector
136 #define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY XENIRQSTAT_needs_eoi
137 #define PHYSDEVOP_IRQ_SHARED XENIRQSTAT_shared
139 #endif /* __XEN_PUBLIC_PHYSDEV_H__ */
147 * indent-tabs-mode: nil