Add init process for test guest VMs

Guest VMs need an init process to be invoked by the GKI kernel. This
process needs to do two things:

1) load vendor kernel modules
For example, GKI does not come with vsock-virtio built in. The ramdisk
will contain vsock-virtio as a kernel module and it is the init's job to
load it.

2) execute a test binary
The init process is given parameters from the kernel command line
(/proc/cmdline). We will use these parameters to invoke a test binary
packaged in the ramdisk, eg. /bin/vsock_server. When init is done with
everything else, it calls execve() to run the specified binary and
passes remaining arguments to it.

This CL adds an init process as a static C++ binary. C++ was chosen
because of dependency on libmodprobe for loading kernel modules.

Test: m virt_hostside_tests_guest_init
      (may not work until later in the series due to path depth limits)
Change-Id: I7b461504850174c435b0e4d666117b97836dff4f
2 files changed
tree: cac2279d4b35f919af50910259a8df7349f11382
  1. authfs/
  2. docs/
  3. tests/
  4. .clang-format
  5. PREUPLOAD.cfg