Previously KVM did not deliver x2apic broadcast IPI (dest-id==0xFFFFFFFF) with physical delivery mode. This test checks the fix. Signed-off-by: Nadav Amit <namit@xxxxxxxxxxxxxxxxx> --- x86/apic.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/x86/apic.c b/x86/apic.c index 2619d85..373f6e0 100644 --- a/x86/apic.c +++ b/x86/apic.c @@ -372,6 +372,24 @@ static void test_multiple_nmi(void) report("multiple nmi", ok); } +static void test_x2apic_broadcast(void) +{ + int i = 0; + u32 old_received = nmi_received; + + if (!enable_x2apic()) + return; + + handle_irq(2, multiple_nmi_handler); + + apic_icr_write(APIC_DEST_PHYSICAL | APIC_DM_NMI | APIC_INT_ASSERT, + (u32)-1); + while (nmi_received == old_received && i++ < 10000) + pause(); + + report("x2apic broadcast", nmi_received != old_received); +} + int main() { setup_vm(); @@ -392,6 +410,7 @@ int main() test_multiple_nmi(); test_tsc_deadline_timer(); + test_x2apic_broadcast(); return report_summary(); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html