fix(loongarch64): harden virtio IRQ and zone startup - #111
Conversation
980fa76 to
5f534bd
Compare
98f16ec to
bc0240d
Compare
|
@enkerewpo Thanks for your review. I have addressed the comments and updated the PR accordingly. Could you please take another look when you have time? |
agicy
left a comment
There was a problem hiding this comment.
I recently hit a console problem in my multi-zone setup: screen zone1 -> exit -> screen zone2 -> back to zone1, and the console is sometimes completely frozen after re-attach. So I'm glad to see this PR touching virtio-console - I did a careful review and left inline comments. Summary of what I found:
- TX backpressure is still missing. On
EAGAIN(pty full), the descriptor is still completed viaupdate_used_ring()and freed, so the guest is told its output was transmitted. A flooding guest never throttles and all output is silently dropped while the pty stays full - this is exactly the "console frozen after re-attach" symptom I observed. The RX changes in this PR don't address it. - The RX rearm logic introduces a permanent stall.
rxq_notify_handlercallsdisable_notify(), which setsVRING_USED_F_NO_NOTIFY. But the event handler only re-arms when the queue is non-empty. If it exits with an empty queue while input is still pending in the pty, theEPOLLONESHOTevent stays disarmed forever and the guest's next kick never comes -> RX is permanently dead. - The descriptor-error path never re-arms the event, so one transient
process_descriptor_chain()failure also kills console RX permanently.
Since these console changes may carry a regression and the actual backpressure fix is still missing, I'd suggest extracting the virtio-console changes from this PR and landing them as a separate PR, so the console fix can be completed properly (RX improvements + rearm fix + TX backpressure via EPOLLOUT) and merged independently of the LoongArch/IVC work.
4056c65 to
6543d6e
Compare
Thanks. This PR now only includes fix on la irq and ivc. A Latter PR will focus on virtio console RX/TX. Maybe we can discuss in that PR carefully. |
enkerewpo
left a comment
There was a problem hiding this comment.
Thanks for the fix — the level-triggered interrupt model and the interrupt_status &= !value → & ~ack correction are both clear improvements (the old logical-not was a real bug).
Two blocking issues before this can land, both about how the new deassert path is numbered, plus a leak on the ivc error path. Details inline.
6543d6e to
7f91746
Compare
fix(loongarch64): harden virtio IRQ and zone startup
fix(loongarch64): harden virtio IRQ and zone startup
Summary
Validation
hvisor.koand started linux1 on the LS3A6000 board/dev/pts/0login,uname, and two guest CPUs