|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Questions on vpic, vlapic, vioapic and line 0 (aka timer)
For some TBD reason (very very rarely) the routine timer_irq_works() in linux
is reporting that the timer IRQ does not work:
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
hangs and xen's console is spewing:
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
vioapic.c:352:d1 Unsupported delivery mode 7
...
I have determined that the lines (in linux):
#ifdef CONFIG_X86_IO_APIC
no_timer_check = 1;
#endif
that KVM has are missing for Xen. The simple workaround is to specify
"no_timer_check" on the kernel command args.
The reason for the email is that I have found the routine
__vlapic_accept_pic_intr:
/* We deliver 8259 interrupts to the appropriate CPU as follows. */
return ((/* IOAPIC pin0 is unmasked and routing to this LAPIC? */
((redir0.fields.delivery_mode == dest_ExtINT) &&
!redir0.fields.mask &&
redir0.fields.dest_id == VLAPIC_ID(vlapic) &&
!vlapic_disabled(vlapic)) ||
/* LAPIC has LVT0 unmasked for ExtInts? */
((lvt0 & (APIC_MODE_MASK|APIC_LVT_MASKED)) == APIC_DM_EXTINT) ||
/* LAPIC is fully disabled? */
vlapic_hw_disabled(vlapic)));
}
Which looks to imply that the vioapic supports "delivery mode 7" (dest_ExtINT),
but this case is missing (the message logged above).
Also linux and xen both set "LAPIC has LVT0" to APIC_DM_FIXED for "Virtual Wire IRQ"
usage, but this code only allows for APIC_DM_EXTINT. I have been able to get "Virtual Wire IRQ"
usage to work by adding:
/* LAPIC has LVT0 unmasked for Fixed? */
((lvt0 & (APIC_MODE_MASK|APIC_LVT_MASKED)) == APIC_DM_FIXED) ||
It is not clear to me if it should be added or just changed.
This code looks to state that:
...trying to set up timer (IRQ0) through the 8259A ...
is expected to fail. Is this by design? (QEMU does allow this case.)
-Don Slutz
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |