-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add QEMU pvpanic ISA device #596
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for drawing this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license-eye has totally checked 254 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
189 | 1 | 64 | 0 |
Click to see the invalid file list
- bin/propolis-server/src/lib/stats/pvpanic.rs
52af7ae
to
c189f9a
Compare
as requested by @pfmooney in review
as requested by @gjcolombo
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! A few comments on how we want the instance spec side of this to look:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one small tweak. (I didn't leave any additional comments on it, but the device emulation also seems fine to me, modulo any other feedback @pfmooney might have.)
Thanks for putting this together!
This branch adds a DSDT entry for the QEMU pvpanic virtual device to OVMF. This is necessary for oxidecomputer/propolis#596 to actually work.
This branch adds support for the pvpanic virtual device implemented by
QEMU. This device allows guests to report kernel panics to the
hypervisor. In
propolis-server
, guest-reported kernel panics arehandled by incrementing an Oximeter metric.
The pvpanic device can be exposed to the guest either as an ISA bus I/O
port device or as a PCI bus device. This branch implements the ISA bus
device. I'd like to also add a PCI pvpanic device, but will implement
that in a subsequent pull request.
In order for the guest to detect the ISA bus pvpanic device, it's
necessary to add an entry for the panic device to the ACPI DSDT table.
This is the AML that QEMU adds to its DSDT when the ISA bus pvpanic
device is enabled:
This means that in order for guests to use this device, we need to boot
with an ACPI table that contains this entry. For testing purposes, I
modified EDK2 OVMF to add this entry to the DSDT. In the future, though,
we'll likely want Propolis to generate ACPI tables dynamically on boot
based on the instance spec.
The EDK2 changes I used for testing this are available here.
To test this change, I ran
propolis-standalone
with an Alpine Linux3.19 guest,, and the following device added to the VM config file:
The guest correctly detects the panic device and loads the appropriate
kernel module. If I then trigger a panic in the guest using SysRq, like
this:
The guest crashes, and
propolis-standalone
logs:Closes #592