Skip to content

Printing during system initialization with 2+ clients causes the system to become unstable #203

@JDuchniewicz

Description

@JDuchniewicz

I discovered this by accident, while debugging why DHCP would sometimes not succeed on Maaxboard with the vswitch connected. The culprit turned out to be

LOG_VMM_ERR("Unknown enable register encoding");

Seems like printing the fail to read the correct value of GIC_DIST_CTLR which is either 0x0 or 0x1 prints that the value was unknown. However, this causes then to IRQs to be somehow unmapped and then we get walls of logs informing us about that:

CLIENT_VMM1|ERROR: Unknown enable register encodingCLIENT_VMM0|ERROR: Unknown enable register encodingCLIENT_VMM1|ERROR: vIRQ 0x1b is not enabled
CLIENT_VMM1|ERROR: VPPI IRQ 27 dropped on vCPU 0
CLIENT_VMM1|ERROR: vIRQ 0x1b is not enabled

This in turn causes the system to exploit other issues, like #204 or DHCP requests leaving the system but the replies never getting back in (possibly due to IRQs not being properly served?).

Commenting out solved the issue, but I wonder if it is just not bikeshedding the problem. It started happening when I added second client to my system.

Also, I had to comment out
main...jakub/vswitch#diff-c962157d12b626220554b9bfa3708d8cece3bc2d7a4b3f5110452e5fa7ea9b23R587
and
main...jakub/vswitch#diff-74789dbe86e8ce3f01a8c609d664fae4ffab6b59d090a1b35eb7482f9ceec989R81
Assertions which is suboptimal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions