At this moment, we duplicate code between all configs/targets/*.c and target-info-stub.c but we will clean up this before the end of this series.
Signed-off-by: Pierrick Bouvier <[email protected]> --- configs/targets/aarch64-softmmu.c | 5 +++++ configs/targets/arm-softmmu.c | 5 +++++ configs/targets/riscv32-softmmu.c | 5 +++++ configs/targets/riscv64-softmmu.c | 5 +++++ include/qemu/target-info-impl.h | 2 ++ include/qemu/target-info.h | 7 +++++++ target-info-stub.c | 5 +++++ target-info.c | 5 +++++ 8 files changed, 39 insertions(+) diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-softmmu.c index 4cf13a187d9..0d8519c3267 100644 --- a/configs/targets/aarch64-softmmu.c +++ b/configs/targets/aarch64-softmmu.c @@ -32,6 +32,11 @@ static const TargetInfo target_info_aarch64_system = { # else .config_multiprocess = false, # endif +# ifdef CONFIG_NITRO + .config_nitro = true, +# else + .config_nitro = false, +# endif # ifdef CONFIG_XEN .config_xen = true, # else diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c index f9b8212fc3c..9ea63d8662e 100644 --- a/configs/targets/arm-softmmu.c +++ b/configs/targets/arm-softmmu.c @@ -32,6 +32,11 @@ static const TargetInfo target_info_arm_system = { # else .config_multiprocess = false, # endif +# ifdef CONFIG_NITRO + .config_nitro = true, +# else + .config_nitro = false, +# endif # ifdef CONFIG_XEN .config_xen = true, # else diff --git a/configs/targets/riscv32-softmmu.c b/configs/targets/riscv32-softmmu.c index 4fe8b096ce0..208d5792fb4 100644 --- a/configs/targets/riscv32-softmmu.c +++ b/configs/targets/riscv32-softmmu.c @@ -31,6 +31,11 @@ static const TargetInfo target_info_riscv32_system = { # else .config_multiprocess = false, # endif +# ifdef CONFIG_NITRO + .config_nitro = true, +# else + .config_nitro = false, +# endif # ifdef CONFIG_XEN .config_xen = true, # else diff --git a/configs/targets/riscv64-softmmu.c b/configs/targets/riscv64-softmmu.c index cfcdac89697..1e0896d8db7 100644 --- a/configs/targets/riscv64-softmmu.c +++ b/configs/targets/riscv64-softmmu.c @@ -31,6 +31,11 @@ static const TargetInfo target_info_riscv64_system = { # else .config_multiprocess = false, # endif +# ifdef CONFIG_NITRO + .config_nitro = true, +# else + .config_nitro = false, +# endif # ifdef CONFIG_XEN .config_xen = true, # else diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-impl.h index 98542bdaeeb..d9c4f0a5da0 100644 --- a/include/qemu/target-info-impl.h +++ b/include/qemu/target-info-impl.h @@ -35,6 +35,8 @@ typedef struct TargetInfo { /* CONFIG_MULTIPROCESS */ bool config_multiprocess; + /* CONFIG_NITRO */ + bool config_nitro; /* CONFIG_XEN */ bool config_xen; } TargetInfo; diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h index 0ecae9411c3..96d85aecdeb 100644 --- a/include/qemu/target-info.h +++ b/include/qemu/target-info.h @@ -127,6 +127,13 @@ bool target_riscv64(void); */ bool target_config_multiprocess(void); +/** + * target_config_nitro: + * + * Returns true if target defines CONFIG_NITRO. + */ +bool target_config_nitro(void); + /** * target_config_xen: * diff --git a/target-info-stub.c b/target-info-stub.c index bafbeaa039f..ca5bdfc5a91 100644 --- a/target-info-stub.c +++ b/target-info-stub.c @@ -51,6 +51,11 @@ static const TargetInfo target_info_stub = { # else .config_multiprocess = false, # endif +# ifdef CONFIG_NITRO + .config_nitro = true, +# else + .config_nitro = false, +# endif # ifdef CONFIG_XEN .config_xen = true, # else diff --git a/target-info.c b/target-info.c index a264c51ce83..067feff98cb 100644 --- a/target-info.c +++ b/target-info.c @@ -120,6 +120,11 @@ bool target_config_multiprocess(void) return target_info()->config_multiprocess; } +bool target_config_nitro(void) +{ + return target_info()->config_nitro; +} + bool target_config_xen(void) { return target_info()->config_xen; -- 2.43.0
