File: arm64-ppc64el-dummy.patch

package info (click to toggle)
cpu-checker 0.7-1.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 29,936 kB
  • sloc: sh: 301; python: 54; makefile: 20
file content (30 lines) | stat: -rw-r--r-- 943 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: add (dummy) arm64 and ppc64el checks
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1282329

--- cpu-checker-0.7.orig/kvm-ok
+++ cpu-checker-0.7/kvm-ok
@@ -48,6 +48,14 @@ if [ "$(uname -m)" = "armv7l" ]; then
 	virt="ARM"
 	kvm_mod="kvm"
     fi
+elif [ "$(uname -m)" = "aarch64" ]; then
+	virt="ARM"
+	kvm_mod="kvm"
+elif [ "$(uname -m)" = "ppc64le" ]; then
+	# FIXME: Assume that all ppc64el is kvm capable
+	exit 0
+	virt="POWER"
+	kvm_mod="kvm"
 else
     virt=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)') || true
     [ "$virt" = "vmx" ] && kvm_mod="kvm_intel"
@@ -103,6 +111,9 @@ elif [ "$virt" = "svm" ]; then
 elif [ "$virt" = "ARM" ]; then
     # Should also test that we booted in HYP mode, if detectable
     :
+elif [ "$virt" = "POWER" ]; then
+    # Should also test that we booted in HYP mode, if detectable
+    :
 else
 	echo "FAIL: Unknown virtualization extension: $virt"
 	verdict 1