Lines Matching full:apic

2  *  APIC support
23 #include "hw/i386/apic.h"
31 #include "hw/i386/apic-msidef.h"
43 #define TYPE_APIC "apic"
45 DECLARE_INSTANCE_CHECKER(APICCommonState, APIC,
57 /* round up the max apic id to next multiple of words */ in apic_set_max_apic_id()
185 APICCommonState *s = APIC(dev); in apic_deliver_pic_intr()
210 #define foreach_apic(apic, deliver_bitmask, code) \ argument
218 apic = local_apics[__i * 32 + __j];\
219 if (apic) {\
279 /* handled in I/O APIC code */ in apic_bus_deliver()
305 APICCommonState *s = APIC(dev); in is_x2apic_mode()
475 APICCommonState *s = APIC(dev); in apic_poll_irq()
517 static bool apic_match_dest(APICCommonState *apic, uint32_t dest) in apic_match_dest() argument
519 if (is_x2apic_mode(&apic->parent_obj)) { in apic_match_dest()
520 return apic->initial_apic_id == dest; in apic_match_dest()
522 return apic->id == (uint8_t)dest; in apic_match_dest()
528 APICCommonState *apic = NULL; in apic_find_dest() local
532 apic = local_apics[i]; in apic_find_dest()
533 if (apic && apic_match_dest(apic, dest)) { in apic_find_dest()
567 APICCommonState *apic; in apic_get_delivery_bitmask() local
590 /* Any APIC in xAPIC mode will interpret 0xFF as broadcast */ in apic_get_delivery_bitmask()
597 apic = local_apics[i]; in apic_get_delivery_bitmask()
598 if (apic) { in apic_get_delivery_bitmask()
600 if (apic->apicbase & MSR_IA32_APICBASE_EXTD) { in apic_get_delivery_bitmask()
601 if ((dest >> 16) == (apic->extended_log_dest >> 16) && in apic_get_delivery_bitmask()
602 (dest & apic->extended_log_dest & 0xffff)) { in apic_get_delivery_bitmask()
610 if (apic->dest_mode == APIC_DESTMODE_LOGICAL_FLAT) { in apic_get_delivery_bitmask()
611 if (dest & apic->log_dest) { in apic_get_delivery_bitmask()
614 } else if (apic->dest_mode == APIC_DESTMODE_LOGICAL_CLUSTER) { in apic_get_delivery_bitmask()
619 * is delivered to an APIC if the cluster address in apic_get_delivery_bitmask()
620 * matches and the APIC's address bit in the cluster is in apic_get_delivery_bitmask()
628 (dest & 0xf0) == (apic->log_dest & 0xf0)) { in apic_get_delivery_bitmask()
629 if (dest & apic->log_dest & 0x0f) { in apic_get_delivery_bitmask()
647 APICCommonState *s = APIC(dev); in apic_sipi()
661 APICCommonState *s = APIC(dev); in apic_deliver()
725 APICCommonState *s = APIC(dev); in apic_get_interrupt()
728 /* if the APIC is installed or enabled, we let the 8259 handle the in apic_get_interrupt()
759 APICCommonState *s = APIC(dev); in apic_accept_pic_intr()
802 s = APIC(dev); in apic_register_read()
948 s = APIC(dev); in apic_register_write()
1084 * MSI and MMIO APIC are at the same memory location, in apic_mem_write()
1086 * APIC is connected directly to the CPU. in apic_mem_write()
1088 * MSI registers are reserved in APIC MMIO and vice versa. in apic_mem_write()
1140 APICCommonState *s = APIC(dev); in apic_realize()
1143 warn_report("Userspace local APIC is deprecated for KVM."); in apic_realize()
1147 memory_region_init_io(&s->io_memory, OBJECT(s), &apic_io_ops, s, "apic-msi", in apic_realize()
1151 * apic-msi's apic_mem_write can call into ioapic_eoi_broadcast, which can in apic_realize()
1152 * write back to apic-msi. As such mark the apic-msi region re-entrancy in apic_realize()
1161 * apic, so we need to call it here and set it to 1 which is the max cpus in apic_realize()
1174 APICCommonState *s = APIC(dev); in apic_unrealize()