qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] accel: allows to select the "best" accelera


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH 1/2] accel: allows to select the "best" accelerator
Date: Tue, 4 Oct 2016 14:29:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 04/10/2016 14:00, Daniel P. Berrange wrote:
> On Tue, Oct 04, 2016 at 01:30:47PM +0200, Laurent Vivier wrote:
>> By default, QEMU uses 'tcg' or the one provided with the "accel"
>> property.
>>
>> But sometime, user wants to use a real accelerator without knowing
>> if he really can, with, for instance accel=kvm:tcg.
>> In this case, and if the accelerator is not available we
>> have a noisy "XXX accelerator not found".
> 
> IMHO it would be better to just remove that warning message
> and continue using existing accel=kvm:tcg syntax to specify
> the preference of which accelerators to use.
> 
> Only emit "XXX accelerator not found", if there are not
> further accelerators listed. eg
> 
>   accel=kvm:tcg
> 
> should not print a "KVM accelerator not found" warning
> when it falls back to tcg, but a
> 
>   accel=kvm
> 
> would print a warning, since no fallback is given.


Something like this?

--- a/accel.c
+++ b/accel.c
@@ -99,7 +99,12 @@ void configure_accelerator(MachineState *ms)
         p = get_opt_name(buf, sizeof(buf), p, ':');
         acc = accel_find(buf);
         if (!acc) {
-            fprintf(stderr, "\"%s\" accelerator not found.\n", buf);
+            if (*p != ':') {
+                /* to avoid to pollute logs, display error only
+                 * on the last accelerator of the list
+                 */
+                fprintf(stderr, "\"%s\" accelerator not found.\n", buf);
+            }
             continue;
         }
         if (acc->available && !acc->available()) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]