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>
|
||
|---|---|---|
| .. | ||
| src | ||
| bindgen.sh | ||
| Cargo.toml | ||