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

Update XDG handlers to use GIVC instead of SSH #941

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nesteroff
Copy link
Contributor

Description of changes

This updates XDG handlers to use GIVC and virtiofs storage instead of SSH and SCP.

For file sharing, this approach uses a shared XDG folder with the following structure: /shared/xdg/mime/appvm. Within the XDG folder there is a separate folder for each MIME type. These folders are passed to the VMs that can handle those types as virtiofs devices. Currently, zathura-vm is used for handling both PDFs and images. Inside each MIME type folder there are subfolders for each appvm. These subfolders are passed to their respective appvms. This way appvms can share files with zathura-vm by simply copying them into they folder.

For example, chrome-vm has the /share/xdg/pdf/chrome-vm folder mounted as /run/xdg/pdf in the guest, but it can’t access the entire mime folder or other appvms files because only /share/xdg/pdf/chrome-vm is passed as virtiofs device. However, zathura-vm has access to the entire MIME folder, which includes subfolders for all appvms.

This is just one possible implementation. The advantage of this approach is that it doesn’t require redesigning the Ghaf file storage system. Files are shared through simple copying with no network data transfers and appvms cannot access files from other appvms since they are isolated at the virtiofs device level.

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run make-checks and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status
  • Change requires full re-installation
  • Change can be updated with nixos-rebuild ... switch

Instructions for Testing

  • List all targets that this applies to:
  • Is this a new feature
    • List the test steps to verify:
  • If it is an improvement how does it impact existing functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant