[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/19] target/arm: Restrict DC-CVAP instruction to TCG accel
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 03/19] target/arm: Restrict DC-CVAP instruction to TCG accel |
Date: |
Mon, 16 Mar 2020 17:06:18 +0100 |
Under KVM the 'Data or unified Cache line Clean by VA to PoP'
instruction will trap.
Fixes: 0d57b4999 ("Add support for DC CVAP & DC CVADP ins")
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
target/arm/helper.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index b61ee73d18..924deffd65 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -6777,7 +6777,7 @@ static const ARMCPRegInfo rndr_reginfo[] = {
REGINFO_SENTINEL
};
-#ifndef CONFIG_USER_ONLY
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque,
uint64_t value)
{
@@ -6820,9 +6820,9 @@ static const ARMCPRegInfo dcpodp_reg[] = {
.accessfn = aa64_cacheop_poc_access, .writefn = dccvap_writefn },
REGINFO_SENTINEL
};
-#endif /*CONFIG_USER_ONLY*/
+#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */
-#endif
+#endif /* TARGET_AARCH64 */
static CPAccessResult access_predinv(CPUARMState *env, const ARMCPRegInfo *ri,
bool isread)
@@ -7929,7 +7929,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
if (cpu_isar_feature(aa64_rndr, cpu)) {
define_arm_cp_regs(cpu, rndr_reginfo);
}
-#ifndef CONFIG_USER_ONLY
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
/* Data Cache clean instructions up to PoP */
if (cpu_isar_feature(aa64_dcpop, cpu)) {
define_one_arm_cp_reg(cpu, dcpop_reg);
@@ -7938,8 +7938,8 @@ void register_cp_regs_for_features(ARMCPU *cpu)
define_one_arm_cp_reg(cpu, dcpodp_reg);
}
}
-#endif /*CONFIG_USER_ONLY*/
-#endif
+#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */
+#endif /* TARGET_AARCH64 */
if (cpu_isar_feature(any_predinv, cpu)) {
define_arm_cp_regs(cpu, predinv_reginfo);
--
2.21.1
- [PATCH v3 00/19] Support disabling TCG on ARM (part 2), Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 01/19] target/arm: Rename KVM set_feature() as kvm_set_feature(), Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 02/19] target/arm: Make set_feature() available for other files, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 03/19] target/arm: Restrict DC-CVAP instruction to TCG accel,
Philippe Mathieu-Daudé <=
- [PATCH v3 04/19] target/arm: Restric the Address Translate operations to TCG accel, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 05/19] target/arm: Restrict Virtualization Host Extensions instructions to TCG, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 06/19] target/arm: Move Makefile variable restricted to CONFIG_TCG, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 08/19] target/arm: Add semihosting stub to allow building without TCG, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 07/19] target/arm: Make cpu_register() available for other files, Philippe Mathieu-Daudé, 2020/03/16