-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path0038-check-for-Qubes-OS-hardware-required-features.patch
74 lines (66 loc) · 3.15 KB
/
0038-check-for-Qubes-OS-hardware-required-features.patch
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 7ff09f4961e2de71eeccb87c08e1fae6d5b74581 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
Date: Sat, 30 Nov 2019 17:36:29 +0100
Subject: [PATCH] check for Qubes OS hardware required features
Warn if the hardware lacks features required for proper Qubes OS operation.
Rework based on previous commits 696bd4c, 63043751a, 7489992dd, 3791fd7 and f6bfe11ab.
---
pyanaconda/core/constants.py | 6 ++++--
pyanaconda/core/util.py | 29 +++++++++++++++++++++++++----
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py
index 5409536016..9209ea70c5 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -156,8 +156,10 @@ WARNING_SUPPORT_REMOVED = N_(
)
WARNING_HARDWARE_UNSUPPORTED = N_(
- "This hardware (or a combination thereof) is not supported by Red Hat. For more information "
- "on supported hardware, please refer to http://www.redhat.com/hardware."
+ "This hardware lacks features required by Qubes OS. Missing features: %(features)s. Without "
+ "these features, Qubes OS will not function normally. It is recommended that only developers "
+ "and power users proceed with the installation. For more information on supported "
+ "hardware, please refer to https://www.qubes-os.org/doc/system-requirements/"
)
# Storage messages
diff --git a/pyanaconda/core/util.py b/pyanaconda/core/util.py
index fbe811cf90..42e9d1fc4b 100644
--- a/pyanaconda/core/util.py
+++ b/pyanaconda/core/util.py
@@ -642,10 +642,31 @@ def detect_unsupported_hardware():
return []
# Check TAINT_HARDWARE_UNSUPPORTED
- if not conf.system.can_detect_unsupported_hardware:
- log.debug("This system doesn't support TAINT_HARDWARE_UNSUPPORTED.")
- elif get_kernel_taint(TAINT_HARDWARE_UNSUPPORTED):
- warnings.append(WARNING_HARDWARE_UNSUPPORTED)
+ try:
+ xl_info = subprocess.check_output(['xl', 'info'])
+ xl_dmesg = subprocess.check_output(['xl', 'dmesg'])
+ except subprocess.CalledProcessError:
+ warnings.append('Unable to check hardware support: xl call failed')
+ else:
+ missing_features = []
+ for line in xl_info.splitlines():
+ if line.startswith(b'virt_caps'):
+ if b'hvm' not in line:
+ missing_features.append('HVM/VT-x/AMD-V')
+ if b'hvm_directio' not in line:
+ missing_features.append('IOMMU/VT-d/AMD-Vi')
+
+ if b'HVM: Hardware Assisted Paging (HAP) detected' not in xl_dmesg:
+ missing_features.append('HAP/SLAT/EPT/RVI')
+
+ # slightly different wording for Intel and AMD
+ if b'Intel VT-d Interrupt Remapping enabled' not in xl_dmesg \
+ and b'Interrupt remapping enabled' not in xl_dmesg:
+ missing_features.append('Interrupt Remapping')
+
+ if missing_features:
+ status = ', '.join(missing_features)
+ warnings.append(WARNING_HARDWARE_UNSUPPORTED % {'features': status})
# Check TAINT_SUPPORT_REMOVED
if not conf.system.can_detect_support_removed:
--
2.45.2