X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fapic.h;h=0be528363613102edf13cf2d9097a71b59d7f321;hb=194c3ac8da18934654586e121a0facfb36b4bc1f;hp=2e4a0a899430daaf099881f21b9b346d7c5adc46;hpb=bbef87558ec784cd99c72b759aa78a8c47aa5fd3;p=palacios.git diff --git a/palacios/include/devices/apic.h b/palacios/include/devices/apic.h index 2e4a0a8..0be5283 100644 --- a/palacios/include/devices/apic.h +++ b/palacios/include/devices/apic.h @@ -22,12 +22,37 @@ #ifdef __V3VEE__ -#include +#include + +typedef enum {IPI_FIXED = 0, + IPI_LOWEST_PRIO = 1, + IPI_SMI = 2, + IPI_RES1 = 3, + IPI_NMI = 4, + IPI_INIT = 5, + IPI_SIPI = 6, + IPI_EXTINT = 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; + + + int (*ack)(struct guest_info * core, uint32_t irq, void * private_data); + void * private_data; +} __attribute__((packed)); + +int v3_apic_send_ipi(struct v3_vm_info * vm, struct v3_gen_ipi * ipi, void * dev_data); -struct vm_device * v3_create_apic(); -int v3_apic_raise_intr(struct vm_device * apic_dev, int intr_num); #endif // ! __V3VEE__