-
Notifications
You must be signed in to change notification settings - Fork 76
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
Implement SHM region management and re-enable DAX in virtiofs #212
Conversation
slp
commented
Aug 9, 2024
•
edited
Loading
edited
aae7810
to
3761190
Compare
cc/ @asahilina |
@tylerfanelli Can you review this? |
@slp Any way I can test? |
@tylerfanelli yes, with this commit in and building with gpu, in the guest you should see:
|
Let's put this on hold until we figure out what's happing in #213 (comment) |
Signed-off-by: Sergio Lopez <[email protected]>
Remove broken and useless kvm_context test. Signed-off-by: Sergio Lopez <[email protected]>
In a future commit we need to extend the functionality of create_guest_memory, so take this opportunity to unify it across flavors/variants. Signed-off-by: Sergio Lopez <[email protected]>
a8719b5
to
4882a7e
Compare
We have multiple devices (fs and gpu) that can use SHM regions. So far, we were creating a single SHM region so only one device could make use of it. In this commit, we implement SHM region management so multiple devices can request their own regions. For the moment, we're hardcoding the SHM region sizes for gpu and fs. A future commit will extend the API so users can configure those sizes as desired. Signed-off-by: Sergio Lopez <[email protected]>
After splitting the functionality into a worker, the SHM region was left behind. Plumb it now to re-enable DAX support. Signed-off-by: Sergio Lopez <[email protected]>
Bring virtiofs DAX support into macOS relying on the mechanisms added for supporting virtio-gpu blobs, which allow us to request HVF the injection of memory regions. Signed-off-by: Sergio Lopez <[email protected]>
Introduce krun_add_virtiofs2 and krun_set_gpu_options2 as variants of krun_add_virtiofs and krun_set_gpu_options respectively, to allow users to specify the DAX/host SHM window size for the device. We're adding variants of existing functions to avoid breaking existing consumers of the library. This isn't great, but we'll do a huge clean up of the API in 2.0. Signed-off-by: Sergio Lopez <[email protected]>
@tylerfanelli PTAL, should be ready now. |
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 on x86_64 Linux
@slp Side note, with this built and latest version of libkrunfw, the chroot_vm example is failing for me (x86_64 Linux). I'll submit an issue so we can track this. Can you confirm?
@tylerfanelli yes, please, open an issue detailing that. |
Tracked with #216 |