virt: Further improve detection of EC2 metal instances
authorBenjamin Herrenschmidt <benh@amazon.com>
Thu, 13 Apr 2023 03:51:31 +0000 (13:51 +1000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 17 Apr 2023 12:21:11 +0000 (13:21 +0100)
commitaab896e2135362ab126830c73284d4af0baad88a
tree46709f2dc811935ea19424224bc78ef5ff9b91e2
parentc8ae0a81bfd5669c6da672cdf86119fb07feb575
virt: Further improve detection of EC2 metal instances

Commit f90eea7d18d9ebe88e6a66cd7a86b618def8945d
virt: Improve detection of EC2 metal instances

Added support for detecting EC2 metal instances via the product
name in DMI by testing for the ".metal" suffix.

Unfortunately this doesn't cover all cases, as there are going to be
instance types where ".metal" is not a suffix (ie, .metal-16xl,
.metal-32xl, ...)

This modifies the logic to also allow those new forms.

Signed-off-by: Benjamin Herrenschmidt <benh@amazon.com>
src/basic/virt.c