[PATCH v2 02/21] accel/meson: Only build hw virtualization with system emulation

Philippe Mathieu-Daudé via posted 21 patches 4 years ago
There is a newer version of this series
[PATCH v2 02/21] accel/meson: Only build hw virtualization with system emulation
Posted by Philippe Mathieu-Daudé via 4 years ago
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 accel/meson.build | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/accel/meson.build b/accel/meson.build
index dfd808d2c8..b9a963cf80 100644
--- a/accel/meson.build
+++ b/accel/meson.build
@@ -2,12 +2,14 @@ specific_ss.add(files('accel-common.c'))
 softmmu_ss.add(files('accel-softmmu.c'))
 user_ss.add(files('accel-user.c'))
 
-subdir('hvf')
-subdir('qtest')
-subdir('kvm')
 subdir('tcg')
-subdir('xen')
-subdir('stubs')
+if have_system
+  subdir('hvf')
+  subdir('qtest')
+  subdir('kvm')
+  subdir('xen')
+  subdir('stubs')
+endif
 
 dummy_ss = ss.source_set()
 dummy_ss.add(files(
-- 
2.34.1


Re: [PATCH v2 02/21] accel/meson: Only build hw virtualization with system emulation
Posted by Thomas Huth 4 years ago
On 03/02/2022 20.17, Philippe Mathieu-Daudé wrote:
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   accel/meson.build | 12 +++++++-----
>   1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/accel/meson.build b/accel/meson.build
> index dfd808d2c8..b9a963cf80 100644
> --- a/accel/meson.build
> +++ b/accel/meson.build
> @@ -2,12 +2,14 @@ specific_ss.add(files('accel-common.c'))
>   softmmu_ss.add(files('accel-softmmu.c'))
>   user_ss.add(files('accel-user.c'))
>   
> -subdir('hvf')
> -subdir('qtest')
> -subdir('kvm')
>   subdir('tcg')
> -subdir('xen')
> -subdir('stubs')
> +if have_system
> +  subdir('hvf')
> +  subdir('qtest')
> +  subdir('kvm')
> +  subdir('xen')
> +  subdir('stubs')

Doesn't this render your first patch useless?

> +endif
>   
>   dummy_ss = ss.source_set()
>   dummy_ss.add(files(

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH v2 02/21] accel/meson: Only build hw virtualization with system emulation
Posted by Philippe Mathieu-Daudé via 4 years ago
On 4/2/22 08:37, Thomas Huth wrote:
> On 03/02/2022 20.17, Philippe Mathieu-Daudé wrote:
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   accel/meson.build | 12 +++++++-----
>>   1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/accel/meson.build b/accel/meson.build
>> index dfd808d2c8..b9a963cf80 100644
>> --- a/accel/meson.build
>> +++ b/accel/meson.build
>> @@ -2,12 +2,14 @@ specific_ss.add(files('accel-common.c'))
>>   softmmu_ss.add(files('accel-softmmu.c'))
>>   user_ss.add(files('accel-user.c'))
>> -subdir('hvf')
>> -subdir('qtest')
>> -subdir('kvm')
>>   subdir('tcg')
>> -subdir('xen')
>> -subdir('stubs')
>> +if have_system
>> +  subdir('hvf')
>> +  subdir('qtest')
>> +  subdir('kvm')
>> +  subdir('xen')
>> +  subdir('stubs')
> 
> Doesn't this render your first patch useless?

No, we don't want to build non-TCG stubs in user-mode ;)

>> +endif
>>   dummy_ss = ss.source_set()
>>   dummy_ss.add(files(
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 


Re: [PATCH v2 02/21] accel/meson: Only build hw virtualization with system emulation
Posted by Thomas Huth 4 years ago
On 04/02/2022 08.51, Philippe Mathieu-Daudé wrote:
> On 4/2/22 08:37, Thomas Huth wrote:
>> On 03/02/2022 20.17, Philippe Mathieu-Daudé wrote:
>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>>   accel/meson.build | 12 +++++++-----
>>>   1 file changed, 7 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/accel/meson.build b/accel/meson.build
>>> index dfd808d2c8..b9a963cf80 100644
>>> --- a/accel/meson.build
>>> +++ b/accel/meson.build
>>> @@ -2,12 +2,14 @@ specific_ss.add(files('accel-common.c'))
>>>   softmmu_ss.add(files('accel-softmmu.c'))
>>>   user_ss.add(files('accel-user.c'))
>>> -subdir('hvf')
>>> -subdir('qtest')
>>> -subdir('kvm')
>>>   subdir('tcg')
>>> -subdir('xen')
>>> -subdir('stubs')
>>> +if have_system
>>> +  subdir('hvf')
>>> +  subdir('qtest')
>>> +  subdir('kvm')
>>> +  subdir('xen')
>>> +  subdir('stubs')
>>
>> Doesn't this render your first patch useless?
> 
> No, we don't want to build non-TCG stubs in user-mode ;)

Ah, well, looking at this twice, I think it's ok, indeed. I was confused by 
the fact that "have_system" and the "CONFIG_SOFTMMU" from patch 01 can have 
two different meanings if the QEMU build has been configured with both, 
softmmu and user targets. So never mind, please!

  Thomas