On Thu, 3 Jul 2025 at 14:45, Philippe Mathieu-Daudé <phi...@linaro.org> wrote: > > On 3/7/25 12:55, Philippe Mathieu-Daudé wrote: > > We should be able to use the 'host' CPU with any hardware accelerator. > > > > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> > > Reviewed-by: Richard Henderson <richard.hender...@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; > > } > > Consider the following hunk squashed: > > -- >8 -- > diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c > index eb8ddebffbf..bdd37cafecd 100644 > --- a/tests/qtest/arm-cpu-features.c > +++ b/tests/qtest/arm-cpu-features.c > @@ -456,7 +456,8 @@ static void test_query_cpu_model_expansion(const > void *data) > "ARM CPU type", NULL); > assert_error(qts, "max", "Parameter 'model.props.not-a-prop' is > unexpected", > "{ 'not-a-prop': false }"); > - assert_error(qts, "host", "The CPU type 'host' requires KVM", NULL); > + assert_error(qts, "host", > + "The CPU type 'host' requires hardware accelerator", > NULL);
Grammar nit: either "a hardware accelerator" or "hardware acceleration". -- PMM