-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Vmgenid on aarch64 #4687
Vmgenid on aarch64 #4687
Conversation
1be1633
to
ef612f2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4687 +/- ##
==========================================
+ Coverage 82.80% 82.81% +0.01%
==========================================
Files 255 255
Lines 30838 30867 +29
==========================================
+ Hits 25534 25563 +29
Misses 5304 5304
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8539059
to
9a6dd56
Compare
9a6dd56
to
4f1d3bd
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.
Overall LGTM.
Following the QEMU implementation, we were allocating a full page for holding the memory of the VMGenID device, even though the device itself is only using 16 bytes for the generation ID. We actually don't have any reason to do that. The Linux kernel itself is just remapping 16 bytes from the address we pass over via ACPI/DeviceTree. Revert to allocating 16 bytes for the VMGenID device and expose the value via a public constant for other systems to consume. Signed-off-by: Babis Chalios <bchalios@amazon.es>
4f1d3bd
to
271f047
Compare
Expose the VMGenID device via Device Tree bindings. We add a node in the Device Tree that passes to the guest the address of the generation ID and the interrupt we are using to notify it about generation changes, aka snapshot events. Signed-off-by: Sudan Landge <sudanl@amazon.com> Signed-off-by: Babis Chalios <bchalios@amazon.es>
Our unit tests for creating FDT depends on DTB blobs that we create once and then we use as a reference to ensure that we don't make a change that breaks them. Now that we pass VMGenID via DeviceTree we need to recreate these blobs, because we modify the layout of the guest memory, so the memory node is suddenly different. Also, fix the code that we use to create these blobs. Since, we re-organized crates in the repo, it was trying to write to non-existent paths. Signed-off-by: Babis Chalios <bchalios@amazon.es>
Linux support for VMGenID on ARM systems landed in kernel 6.10. We only support up to kernel 6.1. So in order to be able to test VMGenID on ARM systems we need to patch our 6.1 kernel to backport the 6.10 commits. This commit adds the patches in our repo under `resources/patches/vmgenid_dt` and changes rebuild.sh to patch 6.1 kernel on ARM before building it. Also, it enables `CONFIG_VMGENID` for ARM 6.1 guest kernel. Eventually we will switch to using guest kernels from Amazon Linux trees hosted on Github, which they will eventually backport the relevant patches. Once this is done we can drop the patches from our tree and we won't need to manually patch them. Signed-off-by: Babis Chalios <bchalios@amazon.es>
Now we have support for the device on ARM hosts as well. Signed-off-by: Babis Chalios <bchalios@amazon.es>
Mention that Linux support VMGenID for systems with DeviceTree support since version 6.10. Also, mention that we only support up to Linux 6.1, so users that want to make use of VMGenID on Linux 6.1 they need to backport DeviceTree support from 6.10. Signed-off-by: Babis Chalios <bchalios@amazon.es>
Also, mention that users need to backport DeviceTree support for VMGenID from mainline 6.10 down to 6.1 guest kernels. Signed-off-by: Babis Chalios <bchalios@amazon.es>
271f047
to
963a73c
Compare
Changes
Add support for VMGenID device on ARM systems. We make the changes required to expose VMGenID to the guest via DeviceTree.
Upstream Linux adds DeviceTree support for VMGenID with Linux 6.10. We do not support Linux 6.10, so in order to test VMGenID on ARM we backport the relevant commits from 6.10 to 6.1. We add the patches in the repo, so that when we recreate CI artifacts, the script will automatically patch 6.1 guest kernel for ARM hosts with them.
Reason
Support VMGenID on ARM hosts.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
PR.
CHANGELOG.md
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.