devices: virtio: fs: Support negative_timeout

Support negative_timeout to allow the guest cache negative lookup
results. This is equivalent of libfuse's negative_timeout flag.

As discussed in [2], to allow FUSE client to cache negative lookup, the
FUSE server needs to return a successful response with nodeid=0 instead
of -ENOENT. Then, the guest fs driver caches the negative dentry and
returns ENOENT to the guest userspace eventually.

[1]:
https://libfuse.github.io/doxygen/structfuse__config.html#ab4205f7343afe6e20edfbfb64cb90248
[2]: https://lore.kernel.org/lkml/20230620151328.1637569-1-keiichiw@chromium.org/T/#m9cbe21daf6c426465c9a2da42ac7981c882dc29f

BUG=b:285101684
TEST=TODO: ARCVM performance test

Change-Id: I8daae03dbfb441db75757f2aa77e42fd0d236801
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4630879
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
3 files changed
tree: a78d1e292a620be04a0ac0014b96db605888f6b7
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. arch/
  9. argh_helpers/
  10. audio_util/
  11. base/
  12. bit_field/
  13. broker_ipc/
  14. common/
  15. cros_async/
  16. cros_fdt/
  17. cros_tracing/
  18. cros_tracing_types/
  19. crosvm_cli/
  20. crosvm_control/
  21. crosvm_plugin/
  22. devices/
  23. disk/
  24. docs/
  25. e2e_tests/
  26. fuse/
  27. fuzz/
  28. gpu_display/
  29. hypervisor/
  30. infra/
  31. io_uring/
  32. jail/
  33. kernel_cmdline/
  34. kernel_loader/
  35. kvm/
  36. kvm_sys/
  37. libcras_stub/
  38. linux_input_sys/
  39. logo/
  40. media/
  41. metrics/
  42. net_sys/
  43. net_util/
  44. perfetto/
  45. power_monitor/
  46. prebuilts/
  47. proto_build_tools/
  48. protos/
  49. qcow_utils/
  50. resources/
  51. riscv64/
  52. rutabaga_gfx/
  53. sandbox/
  54. serde_keyvalue/
  55. src/
  56. swap/
  57. system_api/
  58. tests/
  59. third_party/
  60. tools/
  61. tpm2/
  62. tpm2-sys/
  63. tube_transporter/
  64. usb_sys/
  65. usb_util/
  66. vendor/
  67. vfio_sys/
  68. vhost/
  69. virtio_sys/
  70. vm_control/
  71. vm_memory/
  72. win_audio/
  73. win_util/
  74. x86_64/
  75. .dockerignore
  76. .envrc
  77. .gitignore
  78. .gitmodules
  79. .rustfmt.toml
  80. ARCHITECTURE.md
  81. Cargo.lock
  82. Cargo.toml
  83. CONTRIBUTING.md
  84. DIR_METADATA
  85. LICENSE
  86. mypy.ini
  87. OWNERS
  88. OWNERS_COUNCIL
  89. PRESUBMIT.cfg
  90. pyproject.toml
  91. README.chromeos.md
  92. README.md
  93. rust-toolchain
README.md

crosvm - The ChromeOS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.

crosvm is currently used to run Linux/Android guests on ChromeOS devices.

Logo