qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] accel: Allow to build QEMU without TCG or KVM s


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] accel: Allow to build QEMU without TCG or KVM support
Date: Thu, 17 Jan 2019 12:06:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2019-01-17 11:55, Anthony PERARD wrote:
> On Thu, Jan 17, 2019 at 07:02:24AM +0100, Thomas Huth wrote:
>> On 2019-01-16 18:35, Anthony PERARD wrote:
>>> Instead of deny build of QEMU without a default accelerator, simply
>>> report an error when the user haven't passed -accel or -machine accel=
>>> and TCG and KVM isn't builtin.
>>>
>>> ./configure already check that at least one accelerator is available.
>>>
>>> Signed-off-by: Anthony PERARD <address@hidden>
>>> ---
>>>  accel/accel.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/accel/accel.c b/accel/accel.c
>>> index 68b6d56323..0d5b370dfd 100644
>>> --- a/accel/accel.c
>>> +++ b/accel/accel.c
>>> @@ -91,7 +91,9 @@ void configure_accelerator(MachineState *ms, const char 
>>> *progname)
>>>  #elif defined(CONFIG_KVM)
>>>              accel = "kvm";
>>>  #else
>>> -#error "No default accelerator available"
>>> +            error_report("No accelerator selected and"
>>> +                         " no default accelerator available");
>>> +            exit(1);
>>>  #endif
>>>          }
>>>      }
>>
>> That looks a little bit friendlier, indeed.
>>
>> Reviewed-by: Thomas Huth <address@hidden>
>>
>> Out of curiosity: Did you hit the #error while compiling? Or just by
>> reading the recent patches?
> 
> I've hit the #error. I often build QEMU with --disable-tcg --disable-kvm
> --enable-xen just because I only need to build/test xen. So if I can
> disable features that I don't need to build QEMU a tiny bit faster, I do
> :).

Oh, good to know that this configuration works, too. Maybe you should
also add a

#elif defined(CONFIG_XEN)
        accel = "xen";
#...

part in that case?

 Thomas



reply via email to

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