[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: meson, NEED_CPU_H, CONFIG_TCG and tests/
From: |
Claudio Fontana |
Subject: |
Re: meson, NEED_CPU_H, CONFIG_TCG and tests/ |
Date: |
Fri, 19 Feb 2021 14:13:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 2/19/21 2:04 PM, Claudio Fontana wrote:
> Hi Paolo,
>
> currently we have use of CONFIG_TCG in tests/,
>
> but is that variable available at all in there?
>
> I have to adapt some qemu/tests/qtest/* to work also without tcg for ARM,
>
> but I think I am not seeing CONFIG_TCG filtering through, and I wonder
> whether all the checks in there are actually "wrong".
>
> Looking at meson.build it would seem to me that only stuff in target/ would
> be able to see CONFIG_TCG,
> as a result of
>
> foreach target : target_dirs
> config_target = config_target_mak[target]
> target_name = config_target['TARGET_NAME']
> arch = config_target['TARGET_BASE_ARCH']
> arch_srcs = [config_target_h[target]]
> arch_deps = []
> c_args = ['-DNEED_CPU_H',
> '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
> '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
>
> But how could tests see this?
>
> Thanks,
>
> Claudio
>
By the way, I think Alex is working around this in the TCG tests in the
tests/tcg/Makefile.target:
all:
-include ../../../config-host.mak
-include ../config-$(TARGET).mak
..
In my view we need some solution for at least:
tests/qtest/qmp-cmd-test.c
tests/qtest/boot-serial-test.c
tests/qtest/bios-tables-test.c
which need to behave differently according to whether TCG is available or not
(--disable-tcg):
For the specific case at hand that I encountered, reopening the issue,
I need to make tests/qtest/boot-serial-test.c pass different cpu options for
TCG and KVM,
ie "cortex-a57" for TCG, and "host" for KVM.
Wdyt?
Ciao,
Claudio