X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fapic.h;h=4ddfc7c867696c9a02af272a5e5bebbba08440ee;hb=96fd46fc682a12bb09782319d3a09d7d71e8a39b;hp=e4452e7648f0a2de3aa289cda0b76ecacee5c0e6;hpb=e531d13b53ac8b32bca19131dd7a2824cb17eff9;p=palacios.git diff --git a/palacios/include/devices/apic.h b/palacios/include/devices/apic.h index e4452e7..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 guest_info * info, struct vm_device * apic_dev, int intr_num); #endif // ! __V3VEE__