device_google_gs101/pkvm/pkvm_enabler.gs101.rc
David Brazdil c439f780ee Enable hypervisor on pKVM builds
gs101 builds are getting experimental support for pKVM which can be
enabled either using fastboot or with misc_writer. For _pkvm builds we
want the device to automatically enable pKVM for testing. This patch
adds a new early-init service which checks for the presence of /dev/kvm
and if not found, writes to /misc and forces a reboot.

Bug: 192819132
Bug: 202484976
Test: flash a _pkvm build, observe double-reboot, check /dev/kvm exists
Change-Id: I3834b3e4c6118b3f6e4093ce52d5b94117eca29c
2021-10-08 11:20:14 +00:00

5 lines
No EOL
134 B
Text

service pkvm_enabler /vendor/bin/pkvm_enabler
reboot_on_failure reboot,pkvm-not-enabled
on early-init
exec_start pkvm_enabler