Message ID | 20201102054055.686143-9-liangpeng10@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support disable/enable CPU features for AArch64 | expand |
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c5530550ece0..8c84a16d92a8 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1306,6 +1306,8 @@ static void arm_cpu_set_feature_prop(Object *obj, Visitor *v, const char *name, return; } + isar->user_mask[feat->reg] |= MAKE_64BIT_MASK(feat->shift, feat->length); + if (value) { if (object_property_get_bool(obj, feat->name, &error_abort)) { return; diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c20f1ae20429..1ee653a712fd 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -932,6 +932,7 @@ struct ARMCPU { */ struct ARMISARegisters { uint64_t regs[ID_MAX]; + uint64_t user_mask[ID_MAX]; } isar; uint64_t midr; uint32_t revidr;