Message ID | 20230620055911.187065-9-clg@kaod.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ppc: New reviewers and KVM cleanups | expand |
On 6/20/23 07:59, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater<clg@kaod.org> > --- > hw/ppc/pnv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On 20/6/23 07:59, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater <clg@kaod.org> > --- > hw/ppc/pnv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c > index 590fc64b32e9..fc083173f346 100644 > --- a/hw/ppc/pnv.c > +++ b/hw/ppc/pnv.c > @@ -799,7 +799,8 @@ static void pnv_init(MachineState *machine) > DeviceState *dev; > > if (kvm_enabled()) { > - error_report("The powernv machine does not work with KVM acceleration"); > + error_report("machine %s does not support the KVM accelerator", > + mc->name); > exit(EXIT_FAILURE); > } > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Now thinking loudly, we could have an array of allowed accelerators in MachineClass, similarly to allowed_dynamic_sysbus_devices[], then handle this generically.
On 6/20/23 13:31, Philippe Mathieu-Daudé wrote: > On 20/6/23 07:59, Cédric Le Goater wrote: >> Signed-off-by: Cédric Le Goater <clg@kaod.org> >> --- >> hw/ppc/pnv.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c >> index 590fc64b32e9..fc083173f346 100644 >> --- a/hw/ppc/pnv.c >> +++ b/hw/ppc/pnv.c >> @@ -799,7 +799,8 @@ static void pnv_init(MachineState *machine) >> DeviceState *dev; >> if (kvm_enabled()) { >> - error_report("The powernv machine does not work with KVM acceleration"); >> + error_report("machine %s does not support the KVM accelerator", >> + mc->name); >> exit(EXIT_FAILURE); >> } > > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > > Now thinking loudly, we could have an array of allowed accelerators > in MachineClass, similarly to allowed_dynamic_sysbus_devices[], then > handle this generically. I agree. I had something like that in mind as a followup. C.
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 590fc64b32e9..fc083173f346 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -799,7 +799,8 @@ static void pnv_init(MachineState *machine) DeviceState *dev; if (kvm_enabled()) { - error_report("The powernv machine does not work with KVM acceleration"); + error_report("machine %s does not support the KVM accelerator", + mc->name); exit(EXIT_FAILURE); }
Signed-off-by: Cédric Le Goater <clg@kaod.org> --- hw/ppc/pnv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)