We should be able to use the 'host' CPU with any hardware accelerator. Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- target/arm/arm-qmp-cmds.c | 5 +++-- target/arm/cpu.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c index cefd2352638..ee5eb1bac9f 100644 --- a/target/arm/arm-qmp-cmds.c +++ b/target/arm/arm-qmp-cmds.c @@ -30,6 +30,7 @@ #include "qapi/qapi-commands-misc-arm.h" #include "qobject/qdict.h" #include "qom/qom-qobject.h" +#include "system/hw_accel.h" #include "cpu.h" static GICCapability *gic_cap_new(int version) @@ -116,8 +117,8 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, return NULL; } - if (!kvm_enabled() && !strcmp(model->name, "host")) { - error_setg(errp, "The CPU type '%s' requires KVM", model->name); + if (!hwaccel_enabled() && !strcmp(model->name, "host")) { + error_setg(errp, "The CPU type 'host' requires hardware accelerator"); return NULL; } diff --git a/target/arm/cpu.c b/target/arm/cpu.c index e025e241eda..f3bde82b3a6 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1976,8 +1976,9 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) * this is the first point where we can report it. */ if (cpu->host_cpu_probe_failed) { - if (!kvm_enabled() && !hvf_enabled()) { - error_setg(errp, "The 'host' CPU type can only be used with KVM or HVF"); + if (!hwaccel_enabled()) { + error_setg(errp, "The 'host' CPU type can only be used with " + "hardware accelator such KVM/HVF"); } else { error_setg(errp, "Failed to retrieve host CPU features"); } -- 2.49.0