Skip to content
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

lib/{ukvmem,vfscore}: Move file VMA implementation into vfscore #1407

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from

Conversation

andreittr
Copy link
Contributor

Description of changes

This changeset moves the implementation of the file VMA type from ukvmem to vfscore, bringing file VMAs under the same roof as file operations more generally. The implementation itself is left minimally changed, and no difference to behavior should be observed. Fixing and/or otherwise improving the existing file VMA code falls outside of scope.

As prerequisites for its main goal, this PR includes several tweaks to the ukvmem API, making it easier for libs to implement their own custom VMA types.

Following this change, ukvmem remains as before responsible for virtual memory management & the VMA API, but only provides implementations for fundamental VMAs: anonymous, stack, DMA, reserved.
Other, custom types of VMAs are to be implemented by their respective libs.

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): [e.g. x86_64 or N/A]
  • Platform(s): [e.g. kvm, xen or N/A]
  • Application(s): [e.g. app-python3 or N/A]

Additional configuration

N/A; behavior and configuration should be unaffected.

This change moves the definition of file and DMA VMA structs from the
public `<uk/vma_types.h>` header and into their respective
implementation source files.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
This change moves several definitions from the internal "vmem.h" header
into the public ukvmem API. Specifically:
- vmem_vma_len -> uk_vma_len; part of uk/vmem.h now
- vma_op_* -> uk_vma_op_*; part of new uk/vma_ops.h

This allows custom VMA types to be implemented externally from ukvmem
using only the public ukvmem API.

Checkpatch-Ignore: FUNCTION_WITHOUT_ARGS
Signed-off-by: Andrei Tatar <andrei@unikraft.io>
This change moves the implementation of file-backed VMAs from ukvmem to
vfscore, freeing the former from an unorthogonal responsibility.
Calling code in posix-mmap is updated.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
@andreittr andreittr requested review from a team as code owners May 2, 2024 11:54
@github-actions github-actions bot added area/lib Internal Unikraft Microlibrary lang/c Issues or PRs to do with C/C++ lib/vfscore VFS Core Interface labels May 2, 2024
@andreittr andreittr added this to the v0.17.0 (Calypso) milestone May 2, 2024
@razvand razvand requested review from mogasergiu, andreistan26 and razvanvirtan and removed request for a team May 21, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lib Internal Unikraft Microlibrary lang/c Issues or PRs to do with C/C++ lib/vfscore VFS Core Interface
Projects
Status: 🏗 In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants