s390: mark features that depend on deprecated features as deprecated
v2 cover s390: mark features that depend on deprecated features as deprecated
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(-)
Signature · 1 line
2.55.0
PATCH v2 1/2 target/s390x: externalize feat dependency array
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.
--- 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(-)
target/s390x/cpu_features.c +126 -0
@@ -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[] = {
target/s390x/cpu_features.h +4 -0
@@ -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 )];
target/s390x/cpu_models.c +5 -128
142 lines not on this page · raw message
Signature · 1 line
2.55.0
Re: [PATCH v2 1/2] target/s390x: externalize feat dependency array
Quoted 8 lines · Collin Walling
Move the feature dependency array (dep[][2]) from
cpu_models.ctocpu_features.c, rename the array tos390_feat_deps, and externalize its length.This will allow the array to be used between both files.
Signed-off-by Collin Walling <[email protected]>Reviewed-by Hendrik Brueckner <[email protected]>
Re: [PATCH v2 1/2] target/s390x: externalize feat dependency array
In reply to Collin WallingQuoted 24 lines · Collin Walling
Move the feature dependency array (dep[][2]) from
cpu_models.ctocpu_features.c, rename the array tos390_feat_deps, and externalize its length.This will allow the array to be used between both files.
Signed-off-by Collin Walling <[email protected]>Reviewed-by Hendrik Brueckner <[email protected]>--- 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(-)target/s390x/cpu_features.c +2
-0@@ -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 },
...
Quoted 6 lines
target/s390x/cpu_features.c +2
-2+ { S390_FEAT_SIE_ASTFLEIE2, S390_FEAT_STFLE }, +};static void check_consistency (const S390CPUModel *model) { -static int dep[][2 ] = { - {S390_FEAT_IPTE_RANGE ,S390_FEAT_DAT_ENH },
...
Quoted 1 line
- };
This change moves whole dep[][2] array elsewhere. When back-porting it to the older qemu releases, there's always a merge conflict, because some deps were added later and are not present in the earlier releases.
How these should be hanlded when back-porting?
For example:
v11.1.0-588-g66deb271528 s390x/diag: Introduce DIAG 320 for Certificate Store Facility
introduced { S390_FEAT_CERT_STORE, S390_FEAT_EXTENDED_LENGTH_SCCB },
v11.1.0-602-gd6de77dab6e s390x: Guest support for Secure-IPL Facility
introduced { S390_FEAT_SIPL, S390_FEAT_EXTENDED_LENGTH_SCCB },
and so on.
I guess I should take actual dep[][] arrray in check_consistency() from the version I'm back-porting things to.
FWIW,
Thanks,
/mjt
Re: [PATCH v2 1/2] target/s390x: externalize feat dependency array
Quoted 47 lines · Michael Tokarev
Quoted 24 lines · Collin Walling
Move the feature dependency array (dep[][2]) from
cpu_models.ctocpu_features.c, rename the array tos390_feat_deps, and externalize its length.This will allow the array to be used between both files.
Signed-off-by Collin Walling <[email protected]>Reviewed-by Hendrik Brueckner <[email protected]>---
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(-)target/s390x/cpu_features.c +2
-0@@ -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 },...
Quoted 6 lines
+ {
S390_FEAT_SIE_ASTFLEIE2,S390_FEAT_STFLE}, +};
static voidcheck_consistency(const S390CPUModel *model){
- static int dep[][2] = {
- {S390_FEAT_IPTE_RANGE,S390_FEAT_DAT_ENH},...
Quoted 1 line
- };
This change moves whole dep[][2] array elsewhere. When back-porting it to the older qemu releases, there's always a merge conflict, because some deps were added later and are not present in the earlier releases.
How these should be hanlded when back-porting?
For example:
v11.1.0-588-g66deb271528 s390x/diag: Introduce DIAG 320 for
Certificate Store Facility
introduced {S390_FEAT_CERT_STORE,S390_FEAT_EXTENDED_LENGTH_SCCB},
Quoted 7 lines
v11.1.0-602-gd6de77dab6e s390x: Guest support for Secure-IPL Facility introduced {
S390_FEAT_SIPL,S390_FEAT_EXTENDED_LENGTH_SCCB},and so on.
I guess I should take actual dep[][] arrray in
check_consistency()from the version I'm back-porting things to.
Hi Michael,
Yeah, agreed. It's not worth dragging the additional bits to stable that went in to that same array prior to this patch. Sorry for that.
Thanks,
Eric
Quoted 6 lines
FWIW,
Thanks,
/mjt
PATCH v2 2/2 target/s390x: mark feats dependent on deprecated feats as deprecated
In reply to Collin WallingThere 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.
--- target/s390x/cpu_features.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
target/s390x/cpu_features.c +13 -0
@@ -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) \
Signature · 1 line
2.55.0
Re: [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated
Quoted 9 lines · Collin Walling
There are certain CPU model features that depend on other features that are flagged for deprecation. For example
ineff_nc_txdepends on thetedeprecated 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'
Quoted 8 lines
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 <[email protected]>Reviewed-by Hendrik Brueckner <[email protected]>
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
Eric Farman
Tested-byRe: [PATCH v2 2/2] target/s390x: mark feats dependent on deprecated feats as deprecated
Quoted 19 lines · Matthew Rosato
Quoted 9 lines · Collin Walling
There are certain CPU model features that depend on other features that are flagged for deprecation. For example
ineff_nc_txdepends on thetedeprecated 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'Quoted 8 lines
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 <[email protected]>Reviewed-by Hendrik Brueckner <[email protected]>
Quoted 8 lines
Reviewed-by Matthew Rosato <[email protected]>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_ENHvia 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.
Quoted 3 lines
Thanks,
Matt
Quoted 4 lines · Collin Walling
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.
Quoted 49 lines · Collin Walling
Changelog:
v2
- updated loop structure to restart and check if previous dependencies need to be accounted for
- added fixes tag to patch #2Description:
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_txdepends 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_txin 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_txwill 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"/>
Quoted 9 lines
Collin L. Walling (2):
target/s390x: externalize feat dependency array target/s390x: mark feats dependent on deprecated feats as deprecatedtarget/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:
I'll pick this up and toss it in our CI for a few days. Thank you!!
Eric Farman
AppliedQuoted 49 lines · Collin Walling
Changelog:
v2
- updated loop structure to restart and check if previous dependencies need to be accounted for
- added fixes tag to patch #2Description:
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_txdepends 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_txin 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_txwill 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"/>
Quoted 9 lines
Collin L. Walling (2):
target/s390x: externalize feat dependency array target/s390x: mark feats dependent on deprecated feats as deprecatedtarget/s390x/cpu_features.c | 139 ++++++++++++++++++++++++++++++++++++ target/s390x/cpu_features.h | 4 ++ target/s390x/cpu_models.c | 133 ++-------------------------------- 3 files changed, 148 insertions(+), 128 deletions(-)
Queued to s390x-staging for 11.2; thank you!
Quoted 1 line · Eric Farman
Queued to s390x-staging for 11.2; thank you!
Thanks!
Signature · 2 lines
Regards, Collin