[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] target/s390x: Enforce instruction features
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH v2] target/s390x: Enforce instruction features |
Date: |
Mon, 19 Jun 2017 09:52:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 16.06.2017 07:15, Richard Henderson wrote:
> Introduce a synthetic feature (type MISC) to handle disabling of
> the enforcing of features at translation time.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target/s390x/cpu_features.c | 4 +++-
> target/s390x/cpu_features_def.h | 1 +
> target/s390x/cpu_models.c | 5 +++++
> target/s390x/translate.c | 9 +++++++++
> 4 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
> index 42fd9d7..8d542c0 100644
> --- a/target/s390x/cpu_features.c
> +++ b/target/s390x/cpu_features.c
> @@ -24,7 +24,7 @@
> }
>
> /* indexed by feature number for easy lookup */
> -static const S390FeatDef s390_features[] = {
> +static const S390FeatDef s390_features[S390_FEAT_MAX] = {
> FEAT_INIT("esan3", S390_FEAT_TYPE_STFL, 0, "Instructions marked as n3"),
> FEAT_INIT("zarch", S390_FEAT_TYPE_STFL, 1, "z/Architecture architectural
> mode"),
> FEAT_INIT("dateh", S390_FEAT_TYPE_STFL, 3, "DAT-enhancement facility"),
> @@ -251,6 +251,8 @@ static const S390FeatDef s390_features[] = {
> FEAT_INIT("pcc-xts-eaes-256", S390_FEAT_TYPE_PCC, 60, "PCC
> Compute-XTS-Parameter-Using-Encrypted-AES-256"),
>
> FEAT_INIT("ppno-sha-512-drng", S390_FEAT_TYPE_PPNO, 3, "PPNO
> SHA-512-DRNG"),
> +
> + FEAT_INIT("tcg-all-insns", S390_FEAT_TYPE_MISC, 0, "Enable all insns
> supported by TCG"),
Very mixed feelings about fake features. Will return
strange/wrong/misleading information on baselining/comparing..... I
don't like this.
Basically also because this is a temporary hack and will - in theory -
be dropped at one point. nack from my side.
Can't we just handle the qemu model special as proposed?
--
Thanks,
David