X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fapic.h;h=4ddfc7c867696c9a02af272a5e5bebbba08440ee;hb=c468b488a94fbc829f44184dea37b51c51af0de2;hp=6ad758e12761595346ef56b7f25602c7ef721f84;hpb=9e04092774141204bec0341885f5e726410ceb8e;p=palacios-OLD.git diff --git a/palacios/include/devices/apic.h b/palacios/include/devices/apic.h index 6ad758e..4ddfc7c 100644 --- a/palacios/include/devices/apic.h +++ b/palacios/include/devices/apic.h @@ -25,8 +25,32 @@ #include +typedef enum {IPI_FIXED = 0, + IPI_LOWEST_PRIO = 1, + IPI_SMI = 2, + IPI_NMI = 4, + IPI_INIT = 5, + IPI_EXINT = 7 } ipi_mode_t; + + +struct v3_gen_ipi { + uint8_t vector; + ipi_mode_t mode; + + uint8_t logical : 1; + uint8_t trigger_mode : 1; + uint8_t dst_shorthand : 2; + + uint8_t dst; +} __attribute__((packed)); + +int v3_apic_send_ipi(struct v3_vm_info * vm, struct v3_gen_ipi * ipi, void * dev_data); + +int v3_apic_raise_intr(struct v3_vm_info * vm, + uint32_t irq, uint32_t dst, + void * dev_data); + -int v3_apic_raise_intr(struct v3_vm_info * vm, struct vm_device * apic_dev, uint32_t irq, uint32_t dst); #endif // ! __V3VEE__