> case APIC_SELF_IPI: >- if (apic_x2apic_mode(apic)) { >- kvm_lapic_reg_write(apic, APIC_ICR, >- APIC_DEST_SELF | (val & APIC_VECTOR_MASK)); >- } else >+ if (apic_x2apic_mode(apic)) >+ kvm_x2apic_icr_write(apic, APIC_DEST_SELF | (val & APIC_VECTOR_MASK)); >+ else The original code looks incorrect. Emulating writes to SELF_IPI by writes to ICR has an unwanted side-effect: the value of ICR in vAPIC page gets changed. It is better to use kvm_apic_send_ipi() directly.