[09/10] x86: add dependencies on SVME

Message ID 0a930835-e8b4-40fa-34e5-bc29cde85200@suse.com
State Accepted
Headers
Series x86: re-work ISA extension dependency handling |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

Jan Beulich Dec. 19, 2022, 10:48 a.m. UTC
  SEV-ES is an extension to SVME. SNP in turn is an extension to SEV-ES,
and yet in turn RMPQUERY is a SNP extension.

Note that cpu_arch[] has no SNP entry, so CPU_ANY_SNP_FLAGS remains
unused (just like CPU_SNP_FLAGS already is).
  

Patch

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1059,8 +1059,8 @@  static const arch_entry cpu_arch[] =
   SUBARCH (3dnow, 3DNOW, ANY_3DNOW, false),
   SUBARCH (3dnowa, 3DNOWA, ANY_3DNOWA, false),
   SUBARCH (padlock, PADLOCK, PADLOCK, false),
-  SUBARCH (pacifica, SVME, SVME, true),
-  SUBARCH (svme, SVME, SVME, false),
+  SUBARCH (pacifica, SVME, ANY_SVME, true),
+  SUBARCH (svme, SVME, ANY_SVME, false),
   SUBARCH (abm, ABM, ABM, false),
   SUBARCH (bmi, BMI, BMI, false),
   SUBARCH (tbm, TBM, TBM, false),
@@ -1111,7 +1111,7 @@  static const arch_entry cpu_arch[] =
   SUBARCH (serialize, SERIALIZE, SERIALIZE, false),
   SUBARCH (rdpru, RDPRU, RDPRU, false),
   SUBARCH (mcommit, MCOMMIT, MCOMMIT, false),
-  SUBARCH (sev_es, SEV_ES, SEV_ES, false),
+  SUBARCH (sev_es, SEV_ES, ANY_SEV_ES, false),
   SUBARCH (tsxldtrk, TSXLDTRK, TSXLDTRK, false),
   SUBARCH (kl, KL, ANY_KL, false),
   SUBARCH (widekl, WIDEKL, ANY_WIDEKL, false),
@@ -1126,7 +1126,7 @@  static const arch_entry cpu_arch[] =
   SUBARCH (msrlist, MSRLIST, MSRLIST, false),
   SUBARCH (avx_ne_convert, AVX_NE_CONVERT, ANY_AVX_NE_CONVERT, false),
   SUBARCH (rao_int, RAO_INT, RAO_INT, false),
-  SUBARCH (rmpquery, RMPQUERY, RMPQUERY, false),
+  SUBARCH (rmpquery, RMPQUERY, ANY_RMPQUERY, false),
 };
 
 #undef SUBARCH
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -225,6 +225,12 @@  static const dependency isa_dependencies
     "AVX2" },
   { "VPCLMULQDQ",
     "AVX2" },
+  { "SEV_ES",
+    "SVME" },
+  { "SNP",
+    "SEV_ES" },
+  { "RMPQUERY",
+    "SNP" },
   { "AMX_TILE",
     "XSAVE" },
   { "AMX_INT8",