On 16/03/20 23:27, Nitesh Narayan Lal wrote: > > On 3/10/20 10:03 AM, Marcelo Tosatti wrote: >> On Mon, Mar 09, 2020 at 07:15:50PM -0400, Nitesh Narayan Lal wrote: >>> There are following issues with the ioapic logical destination mode test: >>> >>> - A race condition that is triggered when the interrupt handler >>> ioapic_isr_86() is called at the same time by multiple vCPUs. Due to this >>> the g_isr_86 is not correctly incremented. To prevent this a spinlock is >>> added around ‘g_isr_86++’. >>> >>> - On older QEMU versions initial x2APIC ID is not set, that is why >>> the local APIC IDs of each vCPUs are not configured. Hence the logical >>> destination mode test fails/hangs. Adding ‘+x2apic’ to the qemu -cpu params >>> ensures that the local APICs are configured every time, irrespective of the >>> QEMU version. >>> >>> - With ‘-machine kernel_irqchip=split’ included in the ioapic test >>> test_ioapic_self_reconfigure() always fails and somehow leads to a state where >>> after submitting IOAPIC fixed delivery - logical destination mode request we >>> never receive an interrupt back. For now, the physical and logical destination >>> mode tests are moved above test_ioapic_self_reconfigure(). >>> >>> Fixes: b2a1ee7e ("kvm-unit-test: x86: ioapic: Test physical and logical destination mode") >>> Signed-off-by: Nitesh Narayan Lal <nitesh@xxxxxxxxxx> >> Looks good to me. > > Hi, > > I just wanted to follow up and see if there are any more suggestions for me to > improve this patch before it can be merged. Thanks Nitesh, I have queued it now. Paolo