X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Ficc_bus.h;h=4084340c76bab6faf55cf5dc66b5f63e50d98fec;hb=6f037523d4bf0136d97d1f98ac260bb4031ea278;hp=d75aa57a54d7b77e3c154a2d29a88981ae19e0e4;hpb=fa3ef2ff5003b7cd27bfe11e970760c940525966;p=palacios-OLD.git diff --git a/palacios/include/devices/icc_bus.h b/palacios/include/devices/icc_bus.h index d75aa57..4084340 100644 --- a/palacios/include/devices/icc_bus.h +++ b/palacios/include/devices/icc_bus.h @@ -20,18 +20,45 @@ #ifndef ICC_BUS_H_ #define ICC_BUS_H_ + +struct v3_icc_ops { + int (*raise_intr)(struct guest_info * core, int intr_num, void * private_data); + int (*should_deliver_flat)(struct guest_info * core, uint8_t mda, void * private_data); + int (*should_deliver_cluster)(struct guest_info * core, uint8_t mda, void * private_data); +}; + + +/** + * + */ +int v3_icc_register_apic(struct guest_info *core, struct vm_device * icc_bus, uint8_t apic_phys_id, struct v3_icc_ops * ops, void * priv_data); +int v3_icc_register_ioapic(struct v3_vm_info *vm, struct vm_device * icc_bus, uint8_t apic_phys_id); + /** + * Send an inter-processor interrupt (IPI) from one local APIC to another local APIC. * + * @param icc_bus - The ICC bus that routes IPIs. + * @param apic_src - The source APIC id. + * @param apic_num - The remote APIC number. + * @param icr - A copy of the APIC's ICR. (LAPIC-style ICR, clone from redir table for ioapics) + * @param dfr - A copy of the APIC's DFR (LAPIC-style DFR) + & @param extirq - irq for external interrupts (e.g., from 8259) */ -int v3_icc_register_apic(struct v3_vm_info *info, struct vm_device *icc_bus, struct vm_device *apic, uint32_t apic_num); +int v3_icc_send_ipi(struct vm_device * icc_bus, uint32_t apic_src, uint64_t icr, uint32_t dfr, uint32_t ext_irq); + +#if 0 /** - * Send an inter-processor interrupt (IPI) from this local APIC to another local APIC. + * Send an IRQinter-processor interrupt (IPI) from one local APIC to another local APIC. * - * @param icc_bus The ICC bus that facilitates the communication. - * @param apic_num The remote APIC number. - * @param intr_num The interrupt number. + * @param icc_bus - The ICC bus that routes IPIs. + * @param apic_src - The source APIC id. + * @param apic_num - The remote APIC number. + * @param icrlo - The low 32 bites of the APIC's ICR. */ -int v3_icc_send_ipi(struct vm_device * icc_bus, uint32_t apic_num, uint32_t intr_num); +int v3_icc_send_irq(struct vm_device * icc_bus, uint32_t ioapic_src, uint8_t apic_num, uint8_t irq); + +#endif + #endif /* ICC_BUS_H_ */