diff mbox series

[8/9] ppc/pnv: Rephrase error when run with KVM

Message ID 20230620055911.187065-9-clg@kaod.org
State New
Headers show
Series ppc: New reviewers and KVM cleanups | expand

Commit Message

Cédric Le Goater June 20, 2023, 5:59 a.m. UTC
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Henderson June 20, 2023, 9:12 a.m. UTC | #1
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~
Philippe Mathieu-Daudé June 20, 2023, 11:31 a.m. UTC | #2
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.
Cédric Le Goater June 20, 2023, 11:38 a.m. UTC | #3
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 mbox series

Patch

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);
     }