google-cloud: Print "kvm" fact on aarch64 instances
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 8 Aug 2022 16:13:11 +0000 (12:13 -0400)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 8 Aug 2022 16:17:29 +0000 (12:17 -0400)
commitda3568b25a582603ba15690793c8867cc7c5d2a8
tree28c2feb8f494f68311e79cb2e5ce190cf5137b48
parent54b726fa7c9687b692162488e8934a426f9fa6c3
google-cloud: Print "kvm" fact on aarch64 instances

GCE instances are KVM with a non-QEMU userspace.  On x86-64 we should
recognize this from the CPUID information, but aarch64 has no
equivalent to this.  /proc/device-tree/hypervisor/compatible contains
something but RHEL does not use device tree.  However the SMBIOS
tables exported by GCE do contain:

  Manufacturer: KVM

so we can use that.

  # uname -m
  aarch64
  # virt-what
  google_cloud
  kvm

This commit also updates the test.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2114997
Updates: commit 54b726fa7c9687b692162488e8934a426f9fa6c3
Thanks: Eric Auger, Yongkui Guo
tests/google-cloud/test.sh
virt-what.in