Implement SHM region management and re-enable DAX in virtiofs#212
Merged
tylerfanelli merged 7 commits intocontainers:mainfrom Sep 5, 2024
Merged
Implement SHM region management and re-enable DAX in virtiofs#212tylerfanelli merged 7 commits intocontainers:mainfrom
tylerfanelli merged 7 commits intocontainers:mainfrom
Conversation
aae7810 to
3761190
Compare
Collaborator
Author
|
cc/ @AsahiLina |
Member
|
@tylerfanelli Can you review this? |
Member
|
@slp Any way I can test? |
Collaborator
Author
|
@tylerfanelli yes, with this commit in and building with gpu, in the guest you should see:
|
Collaborator
Author
|
Let's put this on hold until we figure out what's happing in #213 (comment) |
Signed-off-by: Sergio Lopez <slp@redhat.com>
Remove broken and useless kvm_context test. Signed-off-by: Sergio Lopez <slp@redhat.com>
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 <slp@redhat.com>
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 <slp@redhat.com>
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 <slp@redhat.com>
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 <slp@redhat.com>
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 <slp@redhat.com>
Collaborator
Author
|
@tylerfanelli PTAL, should be ready now. |
tylerfanelli
approved these changes
Sep 5, 2024
Member
There was a problem hiding this comment.
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?
Collaborator
Author
|
@tylerfanelli yes, please, open an issue detailing that. |
Member
|
Tracked with #216 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.