Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
Reviewed-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu_map/x86_features.xml | 3 +++
tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml | 1 +
tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1 +
tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml | 1 +
tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml | 1 +
22 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index 5f17255a56..5bf96902d5 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -209,6 +209,9 @@
<alias name='tsc-adjust'/>
<cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000002'/>
</feature>
+ <feature name='sgx'>
+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000004'/>
+ </feature>
<feature name='bmi1'>
<cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000008'/>
</feature>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml
index 0a567bbfae..2b9aef78a2 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml
@@ -1,6 +1,6 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0800c1dc' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000000' ecx='0x00000000' edx='0x08000000'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000004' ecx='0x00000000' edx='0x08000000'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml
index 70a0fc3286..5cf7778d55 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml
@@ -18,6 +18,7 @@
<feature policy='require' name='pdcm'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='intel-pt'/>
<feature policy='require' name='stibp'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml
index edfb8ec421..fa51fcdd0c 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml
@@ -20,6 +20,7 @@
<feature name='pdcm'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='clflushopt'/>
<feature name='intel-pt'/>
<feature name='stibp'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml
index ce51903e53..9e83f4c534 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml
@@ -1,7 +1,7 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
<cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008'
ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml
index 5777a0bfba..60bace9ed6 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml
@@ -18,6 +18,7 @@
<feature policy='require' name='pdcm'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='intel-pt'/>
<feature policy='require' name='xsaves'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml
index 08255621ec..6b9323842a 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml
@@ -20,6 +20,7 @@
<feature name='pdcm'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='clflushopt'/>
<feature name='intel-pt'/>
<feature name='xsaves'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml
index 436ded22eb..910f466b98 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml
@@ -1,6 +1,6 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0800c19c' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
index ed06515e99..1d93d13aaa 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
@@ -17,6 +17,7 @@
<feature policy='require' name='pdcm'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='intel-pt'/>
<feature policy='require' name='md-clear'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml
index 1e3f1d1719..8e32872bf2 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml
@@ -19,6 +19,7 @@
<feature name='pdcm'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='clflushopt'/>
<feature name='intel-pt'/>
<feature name='md-clear'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
index 6a7de576f1..3a2308155c 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
@@ -1,6 +1,6 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000000' ecx='0x00000000' edx='0x08000000'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000004' ecx='0x00000000' edx='0x08000000'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
index 70a0fc3286..5cf7778d55 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
@@ -18,6 +18,7 @@
<feature policy='require' name='pdcm'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='intel-pt'/>
<feature policy='require' name='stibp'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
index 4174d79ce7..00fa402474 100644
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
@@ -20,6 +20,7 @@
<feature name='pdcm'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='clflushopt'/>
<feature name='intel-pt'/>
<feature name='stibp'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
index 33bd1013f0..939506ef89 100644
--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
@@ -1,7 +1,7 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0804c1fc' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02001000' ecx='0x00400010' edx='0x00000010'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02001004' ecx='0x00400010' edx='0x00000010'/>
<cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
index 7fcd20d26d..b816310368 100644
--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
@@ -19,6 +19,7 @@
<feature policy='require' name='dca'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='cmt'/>
<feature policy='require' name='avx512ifma'/>
<feature policy='require' name='intel-pt'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
index 2ce74da604..ce81ad0ec2 100644
--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
@@ -21,6 +21,7 @@
<feature name='dca'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='cmt'/>
<feature name='avx512ifma'/>
<feature name='intel-pt'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml
index ce51903e53..9e83f4c534 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml
@@ -1,7 +1,7 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
<cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008'
ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
index 867970d2c7..7555bc075e 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
@@ -18,6 +18,7 @@
<feature policy='require' name='pdcm'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='intel-pt'/>
<feature policy='require' name='md-clear'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
index d4a2a15e60..1d257a0828 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
@@ -20,6 +20,7 @@
<feature name='pdcm'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='clflushopt'/>
<feature name='intel-pt'/>
<feature name='md-clear'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml
b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml
index fa9571c29d..536354e641 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml
@@ -1,6 +1,6 @@
<!-- Features disabled by QEMU -->
<cpudata arch='x86'>
<cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x0800c1dc' edx='0xb0600000'/>
- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000'
ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
<cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000'
ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
</cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml
b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml
index 5777a0bfba..60bace9ed6 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml
@@ -18,6 +18,7 @@
<feature policy='require' name='pdcm'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='tsc_adjust'/>
+ <feature policy='require' name='sgx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='intel-pt'/>
<feature policy='require' name='xsaves'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml
b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml
index c52e8db235..d2f808f9a6 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml
@@ -20,6 +20,7 @@
<feature name='pdcm'/>
<feature name='osxsave'/>
<feature name='tsc_adjust'/>
+ <feature name='sgx'/>
<feature name='clflushopt'/>
<feature name='intel-pt'/>
<feature name='xsaves'/>
--
2.36.1