Skip to content

Better handling for QEMU debug port #1183

Description

@iximeow

in both propolis-server and standalone we set up the QEMU debug port (aka struct QemuDebugPort) at I/O port 0x402. that's pointed into a file debug.out, which EDK2 ends up filling with a bunch of modestly-interesting information about its view of the VM as it hopefully gets into a guest OS. when it does not get into a guest OS, it'll get into UEFI Interactive Shell v2.2 instead, and everyone experiences moderate to severe dismay. questioning what they've done in life to deserve Shell>, etc.

debugging this is usually a game of "did I set the block size wrong" or "is the disk corrupted" or worse. some examples here are #1059 or #1181 where stuff's just weird.

debug.out ends up just at <propolis-zone>/root/debug.out and isn't persisted anywhere. when the zone is stopped it's gone. it would be nice to persist it somewhere like Propolis logs. unfortunately you can kind of just write arbitrarily to it from guests (assuming you can do arbitrary port I/O, anyway). given that the "normal" EDK2 output around 90k-110k of stuff, we could probably reasonably limit it to like.. 512kb of relayed output as a ceiling and know that the prefix of that is probably EDK2 text that's useful for debugging.

it might even be interesting to make the path configurable as part of an instance spec, so if you're hacking on Propolis and flipping between VM configs they don't all clobber each other... (and if we point it into /var/log/ in a normal zone does that get us nice log rotation behavior? I have no idea!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    developmentRelating to engineering experience and development of propolis, not guest or product interfacesenhancementNew feature or request.guest-firmwareRelates to EDK2 or Propolis configuration thereof.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions