[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v2 08/10] target/arm: Introduce user_mask to indicate whether the f
From: |
Peng Liang |
Subject: |
[RFC v2 08/10] target/arm: Introduce user_mask to indicate whether the feature is set explicitly |
Date: |
Thu, 17 Sep 2020 20:14:47 +0800 |
To add CPU feature dependencies, we need to known whether a CPU feature
is set explicitly or automatically by dependencies mechanism. Introduce
user_mask to do that.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
---
target/arm/cpu.h | 1 +
target/arm/cpu.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index d93ad0f8f00e..c7513a5d393c 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -925,6 +925,7 @@ struct ARMCPU {
*/
struct ARMISARegisters {
uint64_t regs[ID_MAX];
+ uint64_t user_mask[ID_MAX];
} isar;
uint64_t midr;
uint32_t revidr;
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 10a52518dd14..36375807e19d 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1312,6 +1312,8 @@ static void arm_cpu_set_feature_prop(Object *obj, Visitor
*v, const char *name,
feat->shift, feat->length,
feat->ni_value);
}
+
+ isar->user_mask[feat->reg] |= MAKE_64BIT_MASK(feat->shift, feat->length);
}
static void arm_cpu_register_feature_props(ARMCPU *cpu)
--
2.26.2
- [RFC v2 00/10] Support disable/enable CPU features for AArch64, Peng Liang, 2020/09/17
- [RFC v2 01/10] linux-header: Introduce KVM_CAP_ARM_CPU_FEATURE, Peng Liang, 2020/09/17
- [RFC v2 03/10] target/arm: only set ID_PFR1_EL1.GIC for AArch32 guest, Peng Liang, 2020/09/17
- [RFC v2 02/10] target/arm: Update ID fields, Peng Liang, 2020/09/17
- [RFC v2 04/10] target/arm: convert isar regs to array, Peng Liang, 2020/09/17
- [RFC v2 05/10] target/arm: Introduce kvm_arm_cpu_feature_supported, Peng Liang, 2020/09/17
- [RFC v2 07/10] target/arm: Allow ID registers to synchronize to KVM, Peng Liang, 2020/09/17
- [RFC v2 08/10] target/arm: Introduce user_mask to indicate whether the feature is set explicitly,
Peng Liang <=
- [RFC v2 10/10] target/arm: Add CPU features to query-cpu-model-expansion, Peng Liang, 2020/09/17
- [RFC v2 06/10] target/arm: register CPU features for property, Peng Liang, 2020/09/17
- [RFC v2 09/10] target/arm: introduce CPU feature dependency mechanism, Peng Liang, 2020/09/17