* [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated
@ 2026-10-09 18:55 Collin Walling
2026-10-09 18:55 ` [PATCH v2 1/2] target/s390x: externalize feat dependency array Collin Walling
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Collin Walling @ 2026-10-09 18:55 UTC (permalink / raw)
To: qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Eric Farman, Matthew Rosato,
qemu-stable
Changelog:
v2
- updated loop structure to restart and check if previous dependencies
need to be accounted for
- added fixes tag to patch #2
Description:
When the CPU model deprecated-features work was completed in QEMU, features that
have a dependency on a deprecated feature were not themselves marked deprecated.
This patch series corrects that oversight.
Specifically, ineff_nc_tx depends on te, which has been deprecated. When a user
starts a VM with deprecated features disabled, QEMU currently emits:
warning: 'ineff_nc_tx' requires 'te'
With these patches, query-cpu-model-expansion includes ineff_nc_tx in the
deprecated-props array alongside the other deprecated features:
{
"return": {
"deprecated-props": [
"ineff_nc_tx",
"bpb",
"te",
"cte",
"csske"
],
"model": {
"name": "gen17a-base",
"props": { ... }
}
}
}
libvirt uses this response to determine which features to disable when the
deprecated_features=on|off attribute is set. With these patches, ineff_nc_tx
will be disabled along with the other deprecated features. The result can be
verified with virsh domcapabilities:
$ virsh domcapabilities --disable-deprecated-features \
--xpath "/domainCapabilities/cpu/mode[@name='host-model']/feature[@policy='disable']"
<feature policy="disable" name="bpb"/>
<feature policy="disable" name="csske"/>
<feature policy="disable" name="cte"/>
<feature policy="disable" name="ineff_nc_tx"/>
<feature policy="disable" name="te"/>
Collin L. Walling (2):
target/s390x: externalize feat dependency array
target/s390x: mark feats dependent on deprecated feats as deprecated
target/s390x/cpu_features.c | 139 ++++++++++++++++++++++++++++++++++++
target/s390x/cpu_features.h | 4 ++
target/s390x/cpu_models.c | 133 ++--------------------------------
3 files changed, 148 insertions(+), 128 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] target/s390x: externalize feat dependency array
2026-10-09 18:55 [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated Collin Walling
@ 2026-10-09 18:55 ` Collin Walling
2026-10-09 20:37 ` Matthew Rosato
2026-10-09 18:55 ` [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated Collin Walling
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Collin Walling @ 2026-10-09 18:55 UTC (permalink / raw)
To: qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Eric Farman, Matthew Rosato,
qemu-stable
Move the feature dependency array (dep[][2]) from cpu_models.c to
cpu_features.c, rename the array to s390_feat_deps, and externalize
its length.
This will allow the array to be used between both files.
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
---
target/s390x/cpu_features.c | 126 ++++++++++++++++++++++++++++++++++
target/s390x/cpu_features.h | 4 ++
target/s390x/cpu_models.c | 133 ++----------------------------------
3 files changed, 135 insertions(+), 128 deletions(-)
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
index c634e741236..20f9947c7be 100644
--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -223,6 +223,132 @@ void s390_feat_bitmap_to_ascii(const S390FeatBitmap features, void *opaque,
};
}
+const int s390_feat_deps[][2] = {
+ { S390_FEAT_IPTE_RANGE, S390_FEAT_DAT_ENH },
+ { S390_FEAT_IDTE_SEGMENT, S390_FEAT_DAT_ENH },
+ { S390_FEAT_IDTE_REGION, S390_FEAT_DAT_ENH },
+ { S390_FEAT_IDTE_REGION, S390_FEAT_IDTE_SEGMENT },
+ { S390_FEAT_LOCAL_TLB_CLEARING, S390_FEAT_DAT_ENH},
+ { S390_FEAT_LONG_DISPLACEMENT_FAST, S390_FEAT_LONG_DISPLACEMENT },
+ { S390_FEAT_DFP_FAST, S390_FEAT_DFP },
+ { S390_FEAT_TRANSACTIONAL_EXE, S390_FEAT_STFLE_49 },
+ { S390_FEAT_EDAT_2, S390_FEAT_EDAT},
+ { S390_FEAT_MSA_EXT_5, S390_FEAT_KIMD_SHA_512 },
+ { S390_FEAT_MSA_EXT_5, S390_FEAT_KLMD_SHA_512 },
+ { S390_FEAT_MSA_EXT_4, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_SIE_CMMA, S390_FEAT_CMM },
+ { S390_FEAT_SIE_CMMA, S390_FEAT_SIE_GSLS },
+ { S390_FEAT_SIE_PFMFI, S390_FEAT_EDAT },
+ { S390_FEAT_MSA_EXT_8, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_4 },
+ { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
+ { S390_FEAT_VECTOR_PACKED_DECIMAL, S390_FEAT_VECTOR },
+ { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH, S390_FEAT_VECTOR_PACKED_DECIMAL },
+ { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH },
+ { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH3, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2 },
+ { S390_FEAT_VECTOR_ENH, S390_FEAT_VECTOR },
+ { S390_FEAT_VECTOR_ENH2, S390_FEAT_VECTOR_ENH },
+ { S390_FEAT_VECTOR_ENH3, S390_FEAT_VECTOR_ENH2 },
+ { S390_FEAT_INSTRUCTION_EXEC_PROT, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 },
+ { S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, S390_FEAT_ESOP },
+ { S390_FEAT_CMM_NT, S390_FEAT_CMM },
+ { S390_FEAT_GUARDED_STORAGE, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 },
+ { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_STORE_CLOCK_FAST },
+ { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
+ { S390_FEAT_SEMAPHORE_ASSIST, S390_FEAT_STFLE_49 },
+ { S390_FEAT_KIMD_SHA3_224, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHA3_256, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHA3_384, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHA3_512, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHAKE_128, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHAKE_256, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_224, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_256, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_384, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_512, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHAKE_128, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHAKE_256, S390_FEAT_MSA },
+ { S390_FEAT_KMAC_HMAC_SHA_224, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_SHA_256, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_SHA_384, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_SHA_512, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_ESHA_224, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_ESHA_256, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_ESHA_384, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KMAC_HMAC_ESHA_512, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_KM_FULL_XTS_AES_128, S390_FEAT_MSA_EXT_4 },
+ { S390_FEAT_KM_FULL_XTS_AES_256, S390_FEAT_MSA_EXT_4 },
+ { S390_FEAT_KM_FULL_XTS_EAES_128, S390_FEAT_MSA_EXT_4 },
+ { S390_FEAT_KM_FULL_XTS_EAES_256, S390_FEAT_MSA_EXT_4 },
+ { S390_FEAT_PRNO_TRNG_QRTCR, S390_FEAT_MSA_EXT_5 },
+ { S390_FEAT_PRNO_TRNG, S390_FEAT_MSA_EXT_5 },
+ { S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
+ { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
+ { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
+ { S390_FEAT_PTFF_QSIE, S390_FEAT_MULTIPLE_EPOCH },
+ { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
+ { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
+ { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
+ { S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP },
+ { S390_FEAT_DIAG_318, S390_FEAT_EXTENDED_LENGTH_SCCB },
+ { S390_FEAT_CERT_STORE, S390_FEAT_EXTENDED_LENGTH_SCCB },
+ { S390_FEAT_SIPL, S390_FEAT_EXTENDED_LENGTH_SCCB },
+ { S390_FEAT_SCLAF, S390_FEAT_EXTENDED_LENGTH_SCCB },
+ { S390_FEAT_SCLAF, S390_FEAT_SIPL },
+ { S390_FEAT_NNPA, S390_FEAT_VECTOR },
+ { S390_FEAT_RDP, S390_FEAT_LOCAL_TLB_CLEARING },
+ { S390_FEAT_UV_FEAT_AP, S390_FEAT_AP },
+ { S390_FEAT_UV_FEAT_AP_INTR, S390_FEAT_UV_FEAT_AP },
+ { S390_FEAT_PFCR_QAF, S390_FEAT_CCF_BASE },
+ { S390_FEAT_PFCR_CSDST, S390_FEAT_CCF_BASE },
+ { S390_FEAT_PFCR_CSDSTG, S390_FEAT_CCF_BASE },
+ { S390_FEAT_PFCR_CSTST, S390_FEAT_CCF_BASE },
+ { S390_FEAT_PFCR_CSTSTG, S390_FEAT_CCF_BASE },
+ { S390_FEAT_INEFF_NC_TX, S390_FEAT_TRANSACTIONAL_EXE },
+ { S390_FEAT_PLO_CLO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_CSO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DCSO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_CSSTO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_CSDSTO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_CSTSTO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TCS, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TCSG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TCSX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TCSO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QCS, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QCSG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QCSX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QCSO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_LO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DLX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DLO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TL, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TLG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TLX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TLO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QL, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QLG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QLX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QLO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_STO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DST, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DSTG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DSTX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_DSTO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TST, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TSTG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TSTX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_TSTO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QST, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QSTG, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QSTX, S390_FEAT_PLO_EXT },
+ { S390_FEAT_PLO_QSTO, S390_FEAT_PLO_EXT },
+ { S390_FEAT_SIE_ASTFLEIE2, S390_FEAT_STFLE },
+};
+
+const size_t s390_feat_deps_len = ARRAY_SIZE(s390_feat_deps);
+
void s390_get_deprecated_features(S390FeatBitmap features)
{
static const int feats[] = {
diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h
index 421978faa40..8097b219599 100644
--- a/target/s390x/cpu_features.h
+++ b/target/s390x/cpu_features.h
@@ -57,6 +57,10 @@ typedef struct {
int bit; /* bit within the feature type area (fixed) */
} S390FeatDef;
+/* Tuple of features[][0] that depend on other features[][1] */
+extern const int s390_feat_deps[][2];
+extern const size_t s390_feat_deps_len;
+
/* use ordinary bitmap operations to work with features */
typedef unsigned long S390FeatBitmap[BITS_TO_LONGS(S390_FEAT_MAX)];
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index c41d629d680..c30ea2df175 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -440,137 +440,14 @@ void s390_cpu_list(void)
static void check_consistency(const S390CPUModel *model)
{
- static int dep[][2] = {
- { S390_FEAT_IPTE_RANGE, S390_FEAT_DAT_ENH },
- { S390_FEAT_IDTE_SEGMENT, S390_FEAT_DAT_ENH },
- { S390_FEAT_IDTE_REGION, S390_FEAT_DAT_ENH },
- { S390_FEAT_IDTE_REGION, S390_FEAT_IDTE_SEGMENT },
- { S390_FEAT_LOCAL_TLB_CLEARING, S390_FEAT_DAT_ENH},
- { S390_FEAT_LONG_DISPLACEMENT_FAST, S390_FEAT_LONG_DISPLACEMENT },
- { S390_FEAT_DFP_FAST, S390_FEAT_DFP },
- { S390_FEAT_TRANSACTIONAL_EXE, S390_FEAT_STFLE_49 },
- { S390_FEAT_EDAT_2, S390_FEAT_EDAT},
- { S390_FEAT_MSA_EXT_5, S390_FEAT_KIMD_SHA_512 },
- { S390_FEAT_MSA_EXT_5, S390_FEAT_KLMD_SHA_512 },
- { S390_FEAT_MSA_EXT_4, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_SIE_CMMA, S390_FEAT_CMM },
- { S390_FEAT_SIE_CMMA, S390_FEAT_SIE_GSLS },
- { S390_FEAT_SIE_PFMFI, S390_FEAT_EDAT },
- { S390_FEAT_MSA_EXT_8, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_4 },
- { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
- { S390_FEAT_VECTOR_PACKED_DECIMAL, S390_FEAT_VECTOR },
- { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH, S390_FEAT_VECTOR_PACKED_DECIMAL },
- { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH },
- { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH3, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2 },
- { S390_FEAT_VECTOR_ENH, S390_FEAT_VECTOR },
- { S390_FEAT_VECTOR_ENH2, S390_FEAT_VECTOR_ENH },
- { S390_FEAT_VECTOR_ENH3, S390_FEAT_VECTOR_ENH2 },
- { S390_FEAT_INSTRUCTION_EXEC_PROT, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 },
- { S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, S390_FEAT_ESOP },
- { S390_FEAT_CMM_NT, S390_FEAT_CMM },
- { S390_FEAT_GUARDED_STORAGE, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 },
- { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_STORE_CLOCK_FAST },
- { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
- { S390_FEAT_SEMAPHORE_ASSIST, S390_FEAT_STFLE_49 },
- { S390_FEAT_KIMD_SHA3_224, S390_FEAT_MSA },
- { S390_FEAT_KIMD_SHA3_256, S390_FEAT_MSA },
- { S390_FEAT_KIMD_SHA3_384, S390_FEAT_MSA },
- { S390_FEAT_KIMD_SHA3_512, S390_FEAT_MSA },
- { S390_FEAT_KIMD_SHAKE_128, S390_FEAT_MSA },
- { S390_FEAT_KIMD_SHAKE_256, S390_FEAT_MSA },
- { S390_FEAT_KLMD_SHA3_224, S390_FEAT_MSA },
- { S390_FEAT_KLMD_SHA3_256, S390_FEAT_MSA },
- { S390_FEAT_KLMD_SHA3_384, S390_FEAT_MSA },
- { S390_FEAT_KLMD_SHA3_512, S390_FEAT_MSA },
- { S390_FEAT_KLMD_SHAKE_128, S390_FEAT_MSA },
- { S390_FEAT_KLMD_SHAKE_256, S390_FEAT_MSA },
- { S390_FEAT_KMAC_HMAC_SHA_224, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_SHA_256, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_SHA_384, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_SHA_512, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_ESHA_224, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_ESHA_256, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_ESHA_384, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KMAC_HMAC_ESHA_512, S390_FEAT_MSA_EXT_3 },
- { S390_FEAT_KM_FULL_XTS_AES_128, S390_FEAT_MSA_EXT_4 },
- { S390_FEAT_KM_FULL_XTS_AES_256, S390_FEAT_MSA_EXT_4 },
- { S390_FEAT_KM_FULL_XTS_EAES_128, S390_FEAT_MSA_EXT_4 },
- { S390_FEAT_KM_FULL_XTS_EAES_256, S390_FEAT_MSA_EXT_4 },
- { S390_FEAT_PRNO_TRNG_QRTCR, S390_FEAT_MSA_EXT_5 },
- { S390_FEAT_PRNO_TRNG, S390_FEAT_MSA_EXT_5 },
- { S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
- { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
- { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
- { S390_FEAT_PTFF_QSIE, S390_FEAT_MULTIPLE_EPOCH },
- { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
- { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
- { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
- { S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP },
- { S390_FEAT_DIAG_318, S390_FEAT_EXTENDED_LENGTH_SCCB },
- { S390_FEAT_CERT_STORE, S390_FEAT_EXTENDED_LENGTH_SCCB },
- { S390_FEAT_SIPL, S390_FEAT_EXTENDED_LENGTH_SCCB },
- { S390_FEAT_SCLAF, S390_FEAT_EXTENDED_LENGTH_SCCB },
- { S390_FEAT_SCLAF, S390_FEAT_SIPL },
- { S390_FEAT_NNPA, S390_FEAT_VECTOR },
- { S390_FEAT_RDP, S390_FEAT_LOCAL_TLB_CLEARING },
- { S390_FEAT_UV_FEAT_AP, S390_FEAT_AP },
- { S390_FEAT_UV_FEAT_AP_INTR, S390_FEAT_UV_FEAT_AP },
- { S390_FEAT_PFCR_QAF, S390_FEAT_CCF_BASE },
- { S390_FEAT_PFCR_CSDST, S390_FEAT_CCF_BASE },
- { S390_FEAT_PFCR_CSDSTG, S390_FEAT_CCF_BASE },
- { S390_FEAT_PFCR_CSTST, S390_FEAT_CCF_BASE },
- { S390_FEAT_PFCR_CSTSTG, S390_FEAT_CCF_BASE },
- { S390_FEAT_INEFF_NC_TX, S390_FEAT_TRANSACTIONAL_EXE },
- { S390_FEAT_PLO_CLO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_CSO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DCSO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_CSSTO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_CSDSTO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_CSTSTO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TCS, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TCSG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TCSX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TCSO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QCS, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QCSG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QCSX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QCSO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_LO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DLX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DLO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TL, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TLG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TLX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TLO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QL, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QLG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QLX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QLO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_STO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DST, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DSTG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DSTX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_DSTO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TST, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TSTG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TSTX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_TSTO, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QST, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QSTG, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QSTX, S390_FEAT_PLO_EXT },
- { S390_FEAT_PLO_QSTO, S390_FEAT_PLO_EXT },
- { S390_FEAT_SIE_ASTFLEIE2, S390_FEAT_STFLE },
- };
int i;
- for (i = 0; i < ARRAY_SIZE(dep); i++) {
- if (test_bit(dep[i][0], model->features) &&
- !test_bit(dep[i][1], model->features)) {
+ for (i = 0; i < s390_feat_deps_len; i++) {
+ if (test_bit(s390_feat_deps[i][0], model->features) &&
+ !test_bit(s390_feat_deps[i][1], model->features)) {
warn_report("\'%s\' requires \'%s\'.",
- s390_feat_def(dep[i][0])->name,
- s390_feat_def(dep[i][1])->name);
+ s390_feat_def(s390_feat_deps[i][0])->name,
+ s390_feat_def(s390_feat_deps[i][1])->name);
}
}
}
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated
2026-10-09 18:55 [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated Collin Walling
2026-10-09 18:55 ` [PATCH v2 1/2] target/s390x: externalize feat dependency array Collin Walling
@ 2026-10-09 18:55 ` Collin Walling
2026-10-09 20:41 ` Matthew Rosato
2026-10-09 20:37 ` [PATCH v2 0/2] s390: mark features that depend on deprecated features " Matthew Rosato
2026-10-09 21:09 ` Eric Farman
3 siblings, 1 reply; 8+ messages in thread
From: Collin Walling @ 2026-10-09 18:55 UTC (permalink / raw)
To: qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Eric Farman, Matthew Rosato,
qemu-stable
There are certain CPU model features that depend on other features
that are flagged for deprecation. For example `ineff_nc_tx` depends
on the `te` deprecated feature.
If a user defines a VM with the current list of deprecated features
disabled, the following warning occurs:
warning: 'ineff_nc_tx' requires 'te'
To alleviate this, add these "dependent features" to the deprecated
features list. This allows the user to see *all* features that should
be disabled to ensure a successful migration to a host system that
may not support certain deprecated features.
Fixes: 6e55b32d45 ("target/s390x: flag te and cte as deprecated")
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
---
target/s390x/cpu_features.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
index 20f9947c7be..babee7f5bac 100644
--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -360,10 +360,23 @@ void s390_get_deprecated_features(S390FeatBitmap features)
S390_FEAT_TRANSACTIONAL_EXE
};
int i;
+ bool restart;
for (i = 0; i < ARRAY_SIZE(feats); i++) {
set_bit(feats[i], features);
}
+
+ /* Mark features that depend on any deprecated feature */
+ do {
+ restart = false;
+ for (i = 0; i < s390_feat_deps_len; i++) {
+ if (test_bit(s390_feat_deps[i][1], features) &&
+ !test_and_set_bit(s390_feat_deps[i][0], features)) {
+ /* Restart in case set features have other dependencies */
+ restart = true;
+ }
+ }
+ } while (restart);
}
#define FEAT_GROUP_INIT(_name, _group, _desc) \
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated
2026-10-09 18:55 [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated Collin Walling
2026-10-09 18:55 ` [PATCH v2 1/2] target/s390x: externalize feat dependency array Collin Walling
2026-10-09 18:55 ` [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated Collin Walling
@ 2026-10-09 20:37 ` Matthew Rosato
2026-10-09 21:09 ` Eric Farman
3 siblings, 0 replies; 8+ messages in thread
From: Matthew Rosato @ 2026-10-09 20:37 UTC (permalink / raw)
To: Collin Walling, qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Eric Farman, qemu-stable
On 10/9/26 2:55 PM, Collin Walling wrote:
> Changelog:
> v2
> - updated loop structure to restart and check if previous dependencies
> need to be accounted for
To clarify, this was in response to a comment I made to Collin off-list
that I failed to mirror here.
My concern was that v1 was handling a case where A was deprecated and B
depended on A -- but was not catching something like C depending on B
which depended on A -- while B would be marked as deprecated, it would
not be added to feats[], so C would ultimately not be marked deprecated
because B would not be found in feats[].
His v2 patch 2 not only loops to ensure we catch dependencies that may
not yet have been marked deprecated on the previous pass, but it also
instead looks directly at the most up-to-date features bitmap instead of
the local feats[].
AFAICT this is a theoretical problem today, but a potential future
hazard since we definitely have such daisy-chained feature dependencies.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] target/s390x: externalize feat dependency array
2026-10-09 18:55 ` [PATCH v2 1/2] target/s390x: externalize feat dependency array Collin Walling
@ 2026-10-09 20:37 ` Matthew Rosato
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Rosato @ 2026-10-09 20:37 UTC (permalink / raw)
To: Collin Walling, qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Eric Farman, qemu-stable
On 10/9/26 2:55 PM, Collin Walling wrote:
> Move the feature dependency array (dep[][2]) from cpu_models.c to
> cpu_features.c, rename the array to s390_feat_deps, and externalize
> its length.
>
> This will allow the array to be used between both files.
>
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated
2026-10-09 18:55 ` [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated Collin Walling
@ 2026-10-09 20:41 ` Matthew Rosato
2026-10-09 21:07 ` Eric Farman
0 siblings, 1 reply; 8+ messages in thread
From: Matthew Rosato @ 2026-10-09 20:41 UTC (permalink / raw)
To: Collin Walling, qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Eric Farman, qemu-stable
On 10/9/26 2:55 PM, Collin Walling wrote:
> There are certain CPU model features that depend on other features
> that are flagged for deprecation. For example `ineff_nc_tx` depends
> on the `te` deprecated feature.
>
> If a user defines a VM with the current list of deprecated features
> disabled, the following warning occurs:
>
> warning: 'ineff_nc_tx' requires 'te'
>
> To alleviate this, add these "dependent features" to the deprecated
> features list. This allows the user to see *all* features that should
> be disabled to ensure a successful migration to a host system that
> may not support certain deprecated features.
>
> Fixes: 6e55b32d45 ("target/s390x: flag te and cte as deprecated")
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
I tested to verify that the facility in question (ineff_nc_tx) is not
visible to the guest with this patch using host model.
I also tested that purposely deprecating S390_FEAT_VECTOR_ENH via the
feats[] array correctly picked up both ENH2 and ENH3 via the code added
by this patch.
Thanks,
Matt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated
2026-10-09 20:41 ` Matthew Rosato
@ 2026-10-09 21:07 ` Eric Farman
0 siblings, 0 replies; 8+ messages in thread
From: Eric Farman @ 2026-10-09 21:07 UTC (permalink / raw)
To: Matthew Rosato, Collin Walling, qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, qemu-stable
On 10/9/26 4:41 PM, Matthew Rosato wrote:
> On 10/9/26 2:55 PM, Collin Walling wrote:
>> There are certain CPU model features that depend on other features
>> that are flagged for deprecation. For example `ineff_nc_tx` depends
>> on the `te` deprecated feature.
>>
>> If a user defines a VM with the current list of deprecated features
>> disabled, the following warning occurs:
>>
>> warning: 'ineff_nc_tx' requires 'te'
>>
>> To alleviate this, add these "dependent features" to the deprecated
>> features list. This allows the user to see *all* features that should
>> be disabled to ensure a successful migration to a host system that
>> may not support certain deprecated features.
>>
>> Fixes: 6e55b32d45 ("target/s390x: flag te and cte as deprecated")
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
>> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
>
> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
>
> I tested to verify that the facility in question (ineff_nc_tx) is not
> visible to the guest with this patch using host model.
>
> I also tested that purposely deprecating S390_FEAT_VECTOR_ENH via the
> feats[] array correctly picked up both ENH2 and ENH3 via the code added
> by this patch.
Like you, I have also been messing around with some of the chained
features to ensure this behaves as described. Not that they will be
deprecated anytime soon, but that the cascading works correctly.
Tested-by: Eric Farman <farman@linux.ibm.com>
>
> Thanks,
> Matt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated
2026-10-09 18:55 [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated Collin Walling
` (2 preceding siblings ...)
2026-10-09 20:37 ` [PATCH v2 0/2] s390: mark features that depend on deprecated features " Matthew Rosato
@ 2026-10-09 21:09 ` Eric Farman
3 siblings, 0 replies; 8+ messages in thread
From: Eric Farman @ 2026-10-09 21:09 UTC (permalink / raw)
To: Collin Walling, qemu-devel, qemu-s390x
Cc: Hendrik Brueckner, David Hildenbrand, Richard Henderson,
Ilya Leoshkevich, Cornelia Huck, Matthew Rosato, qemu-stable
On 10/9/26 2:55 PM, Collin Walling wrote:
> Changelog:
> v2
> - updated loop structure to restart and check if previous dependencies
> need to be accounted for
> - added fixes tag to patch #2
>
> Description:
>
> When the CPU model deprecated-features work was completed in QEMU, features that
> have a dependency on a deprecated feature were not themselves marked deprecated.
> This patch series corrects that oversight.
>
> Specifically, ineff_nc_tx depends on te, which has been deprecated. When a user
> starts a VM with deprecated features disabled, QEMU currently emits:
>
> warning: 'ineff_nc_tx' requires 'te'
>
> With these patches, query-cpu-model-expansion includes ineff_nc_tx in the
> deprecated-props array alongside the other deprecated features:
>
> {
> "return": {
> "deprecated-props": [
> "ineff_nc_tx",
> "bpb",
> "te",
> "cte",
> "csske"
> ],
> "model": {
> "name": "gen17a-base",
> "props": { ... }
> }
> }
> }
>
> libvirt uses this response to determine which features to disable when the
> deprecated_features=on|off attribute is set. With these patches, ineff_nc_tx
> will be disabled along with the other deprecated features. The result can be
> verified with virsh domcapabilities:
>
> $ virsh domcapabilities --disable-deprecated-features \
> --xpath "/domainCapabilities/cpu/mode[@name='host-model']/feature[@policy='disable']"
> <feature policy="disable" name="bpb"/>
> <feature policy="disable" name="csske"/>
> <feature policy="disable" name="cte"/>
> <feature policy="disable" name="ineff_nc_tx"/>
> <feature policy="disable" name="te"/>
>
> Collin L. Walling (2):
> target/s390x: externalize feat dependency array
> target/s390x: mark feats dependent on deprecated feats as deprecated
>
> target/s390x/cpu_features.c | 139 ++++++++++++++++++++++++++++++++++++
> target/s390x/cpu_features.h | 4 ++
> target/s390x/cpu_models.c | 133 ++--------------------------------
> 3 files changed, 148 insertions(+), 128 deletions(-)
>
For the series:
Reviewed-by: Eric Farman <farman@linux.ibm.com>
I'll pick this up and toss it in our CI for a few days. Thank you!!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-09 21:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 18:55 [PATCH v2 0/2] s390: mark features that depend on deprecated features as deprecated Collin Walling
2026-10-09 18:55 ` [PATCH v2 1/2] target/s390x: externalize feat dependency array Collin Walling
2026-10-09 20:37 ` Matthew Rosato
2026-10-09 18:55 ` [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated Collin Walling
2026-10-09 20:41 ` Matthew Rosato
2026-10-09 21:07 ` Eric Farman
2026-10-09 20:37 ` [PATCH v2 0/2] s390: mark features that depend on deprecated features " Matthew Rosato
2026-10-09 21:09 ` Eric Farman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.