ping for reviews  

On Wed, Apr 22, 2020 at 3:12 PM ZhengZhenyu <zheng.zhenyu@foxmail.com> wrote:
Introduce vendors and some commonly used models
for ARM arch, these will be used for virConnectionGetCapabilities
for ARM CPUs.

Signed-off-by: Zhenyu Zheng <zhengzhenyulixi@gmail.com>
---
 src/cpu_map/Makefile.inc.am       |  7 +++++++
 src/cpu_map/arm_Falkor.xml        | 16 ++++++++++++++++
 src/cpu_map/arm_Kunpeng-920.xml   | 24 ++++++++++++++++++++++++
 src/cpu_map/arm_ThunderX299xx.xml | 16 ++++++++++++++++
 src/cpu_map/arm_cortex-a53.xml    | 16 ++++++++++++++++
 src/cpu_map/arm_cortex-a57.xml    | 15 +++++++++++++++
 src/cpu_map/arm_cortex-a72.xml    | 15 +++++++++++++++
 src/cpu_map/arm_vendors.xml       | 14 ++++++++++++++
 src/cpu_map/index.xml             | 15 +++++++++++++++
 9 files changed, 138 insertions(+)
 create mode 100644 src/cpu_map/arm_Falkor.xml
 create mode 100644 src/cpu_map/arm_Kunpeng-920.xml
 create mode 100644 src/cpu_map/arm_ThunderX299xx.xml
 create mode 100644 src/cpu_map/arm_cortex-a53.xml
 create mode 100644 src/cpu_map/arm_cortex-a57.xml
 create mode 100644 src/cpu_map/arm_cortex-a72.xml
 create mode 100644 src/cpu_map/arm_vendors.xml

diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am
index be64c9a0d4..93c2b19ddf 100644
--- a/src/cpu_map/Makefile.inc.am
+++ b/src/cpu_map/Makefile.inc.am
@@ -2,7 +2,14 @@

 cpumapdir = $(pkgdatadir)/cpu_map
 cpumap_DATA = \
+    cpu_map/arm_cortex-a53.xml \
+       cpu_map/arm_cortex-a57.xml \
+       cpu_map/arm_cortex-a72.xml \
        cpu_map/arm_features.xml \
+       cpu_map/arm_Kunpeng-920.xml \
+       cpu_map/arm_ThunderX299xx.xml \
+       cpu_map/arm_Falkor.xml \
+       cpu_map/arm_vendors.xml \
        cpu_map/index.xml \
        cpu_map/ppc64_vendors.xml \
        cpu_map/ppc64_POWER7.xml \
diff --git a/src/cpu_map/arm_Falkor.xml b/src/cpu_map/arm_Falkor.xml
new file mode 100644
index 0000000000..902ed2b6ba
--- /dev/null
+++ b/src/cpu_map/arm_Falkor.xml
@@ -0,0 +1,16 @@
+<cpus>
+  <model name='Falkor'>
+    <vendor name='Qualcomm'/>
+    <pvr value='0xc00'/>
+    <feature name="fp"/>
+    <feature name="asimd"/>
+    <feature name="evtstrm"/>
+    <feature name="aes"/>
+    <feature name="pmull"/>
+    <feature name="sha1"/>
+    <feature name="sha2"/>
+    <feature name="crc32"/>
+    <feature name="cpuid"/>
+    <feature name="asimdrdm"/>
+  </model>
+</cpus>
diff --git a/src/cpu_map/arm_Kunpeng-920.xml b/src/cpu_map/arm_Kunpeng-920.xml
new file mode 100644
index 0000000000..668b8b50dc
--- /dev/null
+++ b/src/cpu_map/arm_Kunpeng-920.xml
@@ -0,0 +1,24 @@
+<cpus>
+  <model name='Kunpeng-920'>
+    <vendor name='HiSilicon'/>
+    <pvr value='0xd01'/>
+    <feature name="fp"/>
+    <feature name="asimd"/>
+    <feature name="evtstrm"/>
+    <feature name="aes"/>
+    <feature name="pmull"/>
+    <feature name="sha1"/>
+    <feature name="sha2"/>
+    <feature name="crc32"/>
+    <feature name="atomics"/>
+    <feature name="fphp"/>
+    <feature name="asimdhp"/>
+    <feature name="cpuid"/>
+    <feature name="asimdrdm"/>
+    <feature name="jscvt"/>
+    <feature name="fcma"/>
+    <feature name="dcpop"/>
+    <feature name="asimddp"/>
+    <feature name="asimdfhm"/>
+  </model>
+</cpus>
diff --git a/src/cpu_map/arm_ThunderX299xx.xml b/src/cpu_map/arm_ThunderX299xx.xml
new file mode 100644
index 0000000000..9ab3d939e9
--- /dev/null
+++ b/src/cpu_map/arm_ThunderX299xx.xml
@@ -0,0 +1,16 @@
+<cpus>
+  <model name='ThunderX2 99xx'>
+    <vendor name='Cavium'/>
+    <pvr value='0x0af'/>
+    <feature name="fp"/>
+    <feature name="asimd"/>
+    <feature name="evtstrm"/>
+    <feature name="aes"/>
+    <feature name="pmull"/>
+    <feature name="sha1"/>
+    <feature name="sha2"/>
+    <feature name="crc32"/>
+    <feature name="cpuid"/>
+    <feature name="asimdrdm"/>
+  </model>
+</cpus>
diff --git a/src/cpu_map/arm_cortex-a53.xml b/src/cpu_map/arm_cortex-a53.xml
new file mode 100644
index 0000000000..963d6d36e3
--- /dev/null
+++ b/src/cpu_map/arm_cortex-a53.xml
@@ -0,0 +1,16 @@
+<cpus>
+  <model name='cortex-a53'>
+    <vendor name='ARM'/>
+    <pvr value='0xd03'/>
+    <feature name="fp"/>
+    <feature name="asimd"/>
+    <feature name="evtstrm"/>
+    <feature name="aes"/>
+    <feature name="pmull"/>
+    <feature name="sha1"/>
+    <feature name="sha2"/>
+    <feature name="crc32"/>
+    <feature name="cpuid"/>
+    <feature name="asimdrdm"/>
+  </model>
+</cpus>
diff --git a/src/cpu_map/arm_cortex-a57.xml b/src/cpu_map/arm_cortex-a57.xml
new file mode 100644
index 0000000000..92a044ea92
--- /dev/null
+++ b/src/cpu_map/arm_cortex-a57.xml
@@ -0,0 +1,15 @@
+<cpus>
+  <model name='cortex-a57'>
+    <vendor name='ARM'/>
+    <pvr value='0xd07'/>
+    <feature name="fp"/>
+    <feature name="asimd"/>
+    <feature name="evtstrm"/>
+    <feature name="aes"/>
+    <feature name="pmull"/>
+    <feature name="sha1"/>
+    <feature name="sha2"/>
+    <feature name="crc32"/>
+    <feature name="cpuid"/>
+  </model>
+</cpus>
diff --git a/src/cpu_map/arm_cortex-a72.xml b/src/cpu_map/arm_cortex-a72.xml
new file mode 100644
index 0000000000..9664eacd7b
--- /dev/null
+++ b/src/cpu_map/arm_cortex-a72.xml
@@ -0,0 +1,15 @@
+<cpus>
+  <model name='cortex-a72'>
+    <vendor name='ARM'/>
+    <pvr value='0xd08'/>
+    <feature name="fp"/>
+    <feature name="asimd"/>
+    <feature name="evtstrm"/>
+    <feature name="aes"/>
+    <feature name="pmull"/>
+    <feature name="sha1"/>
+    <feature name="sha2"/>
+    <feature name="crc32"/>
+    <feature name="cpuid"/>
+  </model>
+</cpus>
diff --git a/src/cpu_map/arm_vendors.xml b/src/cpu_map/arm_vendors.xml
new file mode 100644
index 0000000000..703c2112b1
--- /dev/null
+++ b/src/cpu_map/arm_vendors.xml
@@ -0,0 +1,14 @@
+<cpus>
+  <vendor name="ARM" value="0x41"/>
+  <vendor name="Broadcom" value="0x42"/>
+  <vendor name="Cavium" value="0x43"/>
+  <vendor name="DigitalEquipment" value="0x44"/>
+  <vendor name="HiSilicon" value="0x48"/>
+  <vendor name="Infineon" value="0x49"/>
+  <vendor name="Freescale" value="0x4D"/>
+  <vendor name="NVIDIA" value="0x4E"/>
+  <vendor name="APM" value="0x50"/>
+  <vendor name="Qualcomm" value="0x51"/>
+  <vendor name="Marvell" value="0x56"/>
+  <vendor name="Intel" value="0x69"/>
+</cpus>
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
index 50b030de29..20646a031c 100644
--- a/src/cpu_map/index.xml
+++ b/src/cpu_map/index.xml
@@ -85,6 +85,21 @@
   </arch>

   <arch name='arm'>
+    <include filename="arm_vendors.xml"/>
     <include filename='arm_features.xml'/>
+
+    <!-- ARM-based CPU models -->
+    <include filename="arm_cortex-a53.xml"/>
+    <include filename="arm_cortex-a57.xml"/>
+    <include filename="arm_cortex-a72.xml"/>
+
+    <!-- Qualcomm-based CPU models -->
+    <include filename='arm_Falkor.xml'/>
+
+    <!-- Cavium-based CPU models -->
+    <include filename='arm_ThunderX299xx.xml'/>
+
+    <!-- Hisilicon-based CPU models -->
+    <include filename="arm_Kunpeng-920.xml"/>
   </arch>
 </cpus>
--
2.26.0.windows.1