-
Notifications
You must be signed in to change notification settings - Fork 110
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 kvm guest memfd related capabilities #288
base: main
Are you sure you want to change the base?
Conversation
It's a continued discussion from |
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.
Could you also squash all the commits into one? |
Hey @KeyboardNerd, are you still interested in landing this? |
4809bf7
to
e305451
Compare
Yup, now I have cycles to finish this up. The failure comes from "Title: Undefined behaviour in |
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 updating this! Let's update the commit message to reflect what's actually happening here (since the code itself isn't directly mentioning any guest_memfd stuff anymore, even though the checking of attribute support remains the motivation for these functions).
The CI failure I think can be fixed by just changing the version in Cargo.toml to 0.19.1. It's weird that cargo audit picks this up, but oh well lol (fixed in main)
The two functions are used to return integer value from KVM_CHECK_EXTENSION ioctl commands. This is useful for capabilities returning an integer with each bits representing different configs. Signed-off-by: Sida Chen <[email protected]>
Summary of the PR
The capabilities are required to properly setup a guest_memfd to provide better host and guest memory isolation. The memory attributes capability returns an integer with each bits representing different configs. For example, the return integer & KVM_MEMORY_ATTRIBUTE_PRIVATE > 0 means the vm is capable of setting memory pages to private.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.