KVM: Start populating /sys/hypervisor with KVM entries

Filippo Sironi
2019-05-14T15:17:03Z

Long-time Xen HVM and Xen PV users are missing /sys/hypervisor entries when
moving to KVM. One report is about getting the VM UUID. The VM UUID can
already be retrieved using /sys/devices/virtual/dmi/id/product_uuid. This has
two downsides: (1) it requires root privileges and (2) it is only available on
KVM and Xen HVM.

By exposing /sys/hypervisor/uuid when running on KVM as well, we provide an
interface that's functional for KVM, Xen HVM, and Xen PV. Let's do so by
providing arch-specific hooks so that different architectures can implement the
hooks in different ways.

Further work can be done by consolidating the creation of the basic
/sys/hypervisor across hypervisors.

Filippo Sironi (2):
KVM: Start populating /sys/hypervisor with KVM entries
KVM: x86: Implement the arch-specific hook to report the VM UUID