crosvm/vfio_sys
Pierre-Clément Tosi 03e3e09e39 vfio_platform: Add support for power_{on,off}()
Add support for VFIO_DEVICE_FEATURE_LOW_POWER_{ENTRY,EXIT} of assigned
vfio-platform devices, enabling CrosVM to control the power state of the
devices without closing their corresponding FDs. Note that this ioctl
interface is currently only supported by the latest Android kernels [1],
although the arguments reuse their vfio-pci (upstream) counterparts.

Attach vfio-platform devices on AArch64 hosts advertising support for
the ioctls to a generic DevicePowerManager, to eventually provide
support for guest-controlled PM:

  [TO GUEST...] <--> DevicePowerManager <--> VfioPlatformDevice
                                                     ^
                                                     |
                                                  (ioctl)
                                                     |
                                                     v
                                                 Host (VFIO)

Guard the feature behind the --vfio-platform-pm CLI flag.

[1]: https://r.android.com/c/3888027

BUG=b:460349550
TEST=tools/presubmit

Change-Id: I82c058442b8fe51a585ad7cb0b00496fd267765c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/7421204
Auto-Submit: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
2026-01-23 14:09:42 -08:00
..
src vfio_platform: Add support for power_{on,off}() 2026-01-23 14:09:42 -08:00
bindgen.sh vfio : Update pvIOMMU for Android16-6.12 2025-06-27 10:39:39 -07:00
Cargo.toml Use workspace dependencies: base 2025-05-15 17:52:56 -07:00