Signed-off-by: Philippe Mathieu-Daudé --- Another API PoC. --- target/arm/hvf/hvf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index d74f576b103..0519903c928 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -17,6 +17,7 @@ #include "system/hvf.h" #include "system/hvf_int.h" #include "system/hw_accel.h" +#include "system/tcg.h" #include "hvf_arm.h" #include "cpregs.h" #include "cpu-sysregs.h" @@ -1014,11 +1015,14 @@ bool arm_hw_accel_cpu_feature_supported(enum arm_features feat, bool can_emulate case ARM_FEATURE_GENERIC_TIMER: return true; case ARM_FEATURE_EL2: + if (can_emulate) { + return true; + } ret = hv_vm_config_get_el2_supported(&supported); assert_hvf_ok(ret); return supported; case ARM_FEATURE_EL3: - return false; + return can_emulate && tcg_enabled(); default: g_assert_not_reached(); } -- 2.49.0