-
Notifications
You must be signed in to change notification settings - Fork 0
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
Infrastructure for running MPS under pKVM #58
Conversation
There are some tests for this, but I haven't updated CI.
|
The CN proofs CI failure looks unrelated to me - this PR doesn't modify any MPS code except |
65a3a2d
to
74585e4
Compare
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.
Very cool work! I am happy to approve as is, and then refactor the MPS makefile in a separate PR.
The next step should be figuring out how to cache / build the disk images in the CI, such that we can test this setup with github actions.
EDIT: one thing to change would to be to run sed 's/RTS/MPS/g'
on the codebase
@@ -0,0 +1,10 @@ | |||
#!/bin/bash |
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.
Lets refactor the makefile in lieu of this script, as mentioned in #49
0x1 [[0x33fe, 0x41d3], [0x1842, 0xce9e], [0xa731, 0x6312], [0xbabb, 0xaa2e]] [[0xd683, 0x8077, 0x2d0d], [0x0c50, 0xa354, 0xb23e], [0xc806, 0xa680, 0x25d1], [0x965f, 0xba1f, 0x7f91]] 0x1 0x3 | ||
0x3 [[0x8f55, 0xa308], [0x8910, 0xc8f3], [0xed53, 0xa96e], [0x6b72, 0xb094]] [[0x8024, 0x2af2, 0x8a77], [0xd392, 0x6b95, 0xc5e4], [0xd167, 0x78eb, 0xae62], [0xd786, 0x2183, 0xeda3]] 0x3 0x3 | ||
0x1 [[0x03a4, 0x7579], [0xfef5, 0x193e], [0x8381, 0xbdd3], [0x649d, 0xae79]] [[0xc42c, 0xd33a, 0x2cc9], [0xa687, 0x657b, 0xbf3b], [0x48d2, 0xc9b1, 0x2b48], [0xb123, 0x8814, 0x497c]] 0x2 0x3 | ||
0x1 [[0x753c, |
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.
Given these are re-generated every time you build the MPS, maybe we should just add them to .gitignore
?
format = "raw" | ||
path = "build_helper.sh" | ||
|
||
[process.9p.vm_runner] |
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.
What does 9p
stand for?
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.
QEMU's filesystem passthrough uses the Plan 9 remote filesystem protocol, which is named "9P". The name 9p
shows up in various places: QEMU uses -device virtio-9p-pci,options...
to configure the passthrough, and inside the guest you mount it via mount -t 9p ...
.
command. In the future, this can be extended to check for a specific | ||
signature before mounting the device. | ||
|
||
A typical boot process works like this: |
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.
Very cool re-use of vm_runner
!
src/vm_runner/install_helper.sh
Outdated
vm_runner/target/"$target"/release/opensut_boot \ | ||
/opt/opensut/bin | ||
|
||
# TODO: install systemd unit and configure to run on startup |
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.
How important is this TODO?
How thorough should that change be? If the goal is to replace literally all mentions of "RTS" including e.g. renaming For the current PR, I used the "RTS" name within the MPS code for consistency with existing code that still uses "RTS", and I used "MPS" in the vm_runner test scripts, which are mostly independent of the MPS codebase. |
That works for me, lets do that in a new PR |
@spernsteiner feel free to merge as is |
Previously, while `runner.py` was waiting for a response from the RTS, it would send an update-display (`D`) command every second. In the nested-VM setup, updating the display is fairly expensive due to the I/O involved. If the MPS got behind for any reason, in order to catch up, it would need to process not only the pending command but all the update-display commands that were sent while the test runner was waiting. Sending an update-display command every second thus severely exacerbated the slow performance of the nested-VM setup. This commit changes `runner.py` to send the update-display command every 10 seconds instead of every second. The test suite now behaves more reliably in the nested-VM setup.
Builds the VM runner in the CI, some small CI improvements --------- Co-authored-by: spernsteiner <[email protected]>
7a531ac
to
f5474f1
Compare
This branch adds support for running and testing MPS under a pKVM guest. This has two parts:
vm_runner
tool that launches QEMU VMs or other commands based on a configuration file. This is used to automate startup of the host VM, guest VM, and MPS itself.Documentation for
vm_runner
can be found in its README. Instructions for running the MPS test suite against an MPS instance running inside a VM can be found in tests/README.md.Fixes #35
Checklist before requesting a review