Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

govmm: add VhostUserFS vhost-user device type #86

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

stefanha
Copy link

The QEMU vhost-user-fs-pci device provides virtio-fs host<->guest file
system sharing (https://virtio-fs.gitlab.io/). The device is
instantiated like this:

$ qemu -chardev socket,path=/tmp/vhost-fs.sock,id=chr0
-device vhost-user-fs-pci,tag=myfs,chardev=chr0,cache-size=4G,versiontable=/dev/shm/fuse_shared_versions

This patch adds the VhostUserFS DeviceDriver and command-line generation
for this QEMU device.

Signed-off-by: Stefan Hajnoczi stefanha@redhat.com

Note that vhost-user-fs-pci is not yet available in qemu.git/master so it may be desirable to leave this pull request as "work in progress" until upstream QEMU merges the feature. This govmm patch is a prerequisite for Kata Containers virtio-fs support.

The QEMU vhost-user-fs-pci device provides virtio-fs host<->guest file
system sharing (https://virtio-fs.gitlab.io/).  The device is
instantiated like this:

  $ qemu -chardev socket,path=/tmp/vhost-fs.sock,id=chr0
         -device vhost-user-fs-pci,tag=myfs,chardev=chr0,cache-size=4G,versiontable=/dev/shm/fuse_shared_versions

This patch adds the VhostUserFS DeviceDriver and command-line generation
for this QEMU device.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Copy link

@devimc devimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @stefanha

Copy link
Contributor

@markdryan markdryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well. There seems to be some issue with coveralls, unrelated to this patch. I'll re-trigger the build to see whether that fixes it.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 79.241% when pulling 3c84b1d on stefanha:virtio-fs into 78d079d on intel:master.

devParams = append(devParams, string(driver))
devParams = append(devParams, fmt.Sprintf("chardev=%s", vhostuserDev.CharDevID))
devParams = append(devParams, fmt.Sprintf("tag=%s", vhostuserDev.Tag))
devParams = append(devParams, fmt.Sprintf("cache-size=%dG", vhostuserDev.CacheSize))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coveralls seems to be working again, but actually I do have a question. Is 0 a valid value for vhostuserDev.CacheSize? I ask as we don't check this value in the Valid method, which led me to wonder whether cache-size=0G was a valid option.

@stefanha
Copy link
Author

stefanha commented Feb 20, 2019 via email

@markdryan
Copy link
Contributor

QEMU currently prints an error for cache-size=0G but that will change soon. cache-size=0G will disable the DAX feature on the QEMU side. Probably best not to check vhostuserDev.CacheSize in Kata.

Okay, sounds good.

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

Successfully merging this pull request may close these issues.

None yet

5 participants