Skip to contentSkip to conversation

Serial Port Driver does not handle interrupt

DISCUSSION Erik Rull 3 participants 6 messages Nov 9, 2009 – Nov 17, 2009 KVM

lore
Share & tools
lore

Erik Rull

author
#0 lore raw

Hi all,

I've tested two kvm versions 77 and 88, both with the same behaviour:
I add a serial device with -serial /dev/ttyS0 to my guest and launched HyperTerm on my Windows Guest.
Additionally I plugged in a loopback plug on the serial connector that just routes back the data send back to the receive line (TXD -> RXD).
When I enter characters on the Hyperterm all characters are displayed except the last one that was sent.
When I plug in a real serial device and request its status via Hyperterm I get only back the first 16 chars (I expect 50) when I send an additional dummy character (sizeof: 16550 FIFO buffer). On my normal Windows PC it works as expected - so it seems to be an issue with kvm.

In the linux host, I don't see any changes in /proc/interrupts, the driver is opened and exclusively on this interrupt line.

Within the host the serial line works without any problems, and there, the interrupt counts increase during normal operation with a software that runs on the host and that uses this serial line.

What must I do to bring the serial line to real life with a complete communication without any data lost caused by missing interrupts? At the moment this is a key issue that has to be solved to continue my work with kvm.

Any Ideas? I also tested other IRQ lines and other ttyS* on the system - same behaviour.

Thanks in advance,

Erik

#1 lore raw
Quoted 12 lines · Erik Rull

Hi all,

I've tested two kvm versions 77 and 88, both with the same behaviour:
I add a serial device with -serial /dev/ttyS0 to my guest and launched HyperTerm on my Windows Guest.
Additionally I plugged in a loopback plug on the serial connector that just routes back the data send back to the receive line (TXD -> RXD).
When I enter characters on the Hyperterm all characters are displayed except the last one that was sent.
When I plug in a real serial device and request its status via Hyperterm I get only back the first 16 chars (I expect 50) when I send an additional dummy character (sizeof: 16550 FIFO buffer). On my normal Windows PC it works as expected - so it seems to be an issue with kvm.

In the linux host, I don't see any changes in /proc/interrupts, the driver is opened and exclusively on this interrupt line.

Within the host the serial line works without any problems, and there, the interrupt counts increase during normal operation with a software that runs on the host and that uses this serial line.

Quoted 11 lines

What must I do to bring the serial line to real life with a complete communication without any data lost caused by missing interrupts? At the moment this is a key issue that has to be solved to continue my work with kvm.

Any Ideas? I also tested other IRQ lines and other ttyS* on the system - same behaviour.

Thanks in advance,

Erik

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

fixed, apic on host side was disabled, kvm / qemu seems to need it.

author
#2 lore raw
In reply to Erik Rull
Quoted 12 lines · Erik Rull

Hi all,

I've tested two kvm versions 77 and 88, both with the same behaviour:
I add a serial device with -serial /dev/ttyS0 to my guest and launched HyperTerm on my Windows Guest.
Additionally I plugged in a loopback plug on the serial connector that just routes back the data send back to the receive line (TXD -> RXD).
When I enter characters on the Hyperterm all characters are displayed except the last one that was sent.
When I plug in a real serial device and request its status via Hyperterm I get only back the first 16 chars (I expect 50) when I send an additional dummy character (sizeof: 16550 FIFO buffer). On my normal Windows PC it works as expected - so it seems to be an issue with kvm.

In the linux host, I don't see any changes in /proc/interrupts, the driver is opened and exclusively on this interrupt line.

Within the host the serial line works without any problems, and there, the interrupt counts increase during normal operation with a software that runs on the host and that uses this serial line.

Quoted 11 lines

What must I do to bring the serial line to real life with a complete communication without any data lost caused by missing interrupts? At the moment this is a key issue that has to be solved to continue my work with kvm.

Any Ideas? I also tested other IRQ lines and other ttyS* on the system - same behaviour.

Thanks in advance,

Erik

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

fixed, apic on host side was disabled, kvm / qemu seems to need it.

#3 lore raw
Quoted 5 lines · Erik Rull
Quoted 2 lines · Erik Rull

Any Ideas? I also tested other IRQ lines and other ttyS* on the system - same behaviour.

fixed, apic on host side was disabled, kvm / qemu seems to need it.

I think I hit the same issue. What did you do exactly to solve it ? Enable a kernel option ? May I ask which one ? :)

Sorry, I dont have the hardware right now (so I can't play with apic options). I will have it in a few weeks, so that's why I am asking :)

Thanks a lot,
Rodrigo

#4 lore raw
Quoted 4 lines · Rodrigo Campos
Quoted 3 lines · Erik Rull
Quoted 2 lines · Erik Rull

Any Ideas? I also tested other IRQ lines and other ttyS* on the system - same behaviour.

Quoted 8 lines
Quoted 1 line

fixed, apic on host side was disabled, kvm / qemu seems to need it.

I think I hit the same issue. What did you do exactly to solve it ? Enable a kernel option ? May I ask which one ? :)

Sorry, I dont have the hardware right now (so I can't play with apic options). I will have it in a few weeks, so that's why I am asking :)

I enabled the APIC stuff in Kernel and removed my lapic noapic boot parameters. APIC is enabled if you look into /proc/interrupts and the IRQ type is something with apic and not pc / xt.

Also ensure that the IRQ line of the serial port matches those of your linux drivers! Otherwise the interrupt gets lost and you'll see some strange behaviours (Chars missing, delayed responses,...).

Best regards,

Erik

#5 lore raw
Quoted 10 lines · Erik Rull
Quoted 9 lines · Rodrigo Campos
Quoted 4 lines · Erik Rull
Quoted 2 lines · Erik Rull

Any Ideas? I also tested other IRQ lines and other ttyS* on the system - same behaviour.

fixed, apic on host side was disabled, kvm / qemu seems to need it.

I think I hit the same issue. What did you do exactly to solve it ? Enable a kernel option ? May I ask which one ? :)

Quoted 7 lines
Quoted 3 lines

Sorry, I dont have the hardware right now (so I can't play with apic options). I will have it in a few weeks, so that's why I am asking :)

I enabled the APIC stuff in Kernel and removed my lapic noapic boot parameters. APIC is enabled if you look into /proc/interrupts and the IRQ type is something with apic and not pc / xt.

Ahh, thanks :)

Quoted 4 lines

Also ensure that the IRQ line of the serial port matches those of your linux drivers! Otherwise the interrupt gets lost and you'll see some strange behaviours (Chars missing, delayed responses,...).

I will check that too.

Thanks a lot,
Rodrigo