X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fapic.h;h=40415e6c4188f334d9e9f887ccb5344725c16c17;hb=01d142cec24e5054d8d86e5dba1eff7f5b008c72;hp=2858b247e00ea5a4fe38b97e19ff4d59fbe5d781;hpb=6c56ead58f57e08c23eab5d67f2a58f95ce712b4;p=palacios.git diff --git a/palacios/include/devices/apic.h b/palacios/include/devices/apic.h index 2858b24..40415e6 100644 --- a/palacios/include/devices/apic.h +++ b/palacios/include/devices/apic.h @@ -22,9 +22,35 @@ #ifdef __V3VEE__ -#include +#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 vm_device * dev, + struct v3_gen_ipi * ipi); + +int v3_apic_raise_intr(struct v3_vm_info * vm, struct vm_device * apic_dev, + uint32_t irq, uint32_t dst); + -struct vm_device * v3_create_apic(); #endif // ! __V3VEE__