diff mbox series

[RFC,v2,9/9] target/loongarch: Add loongarch kvm into meson build

Message ID 20230427072645.3368102-10-zhaotianrui@loongson.cn
State New
Headers show
Series Add loongarch kvm accel support | expand

Commit Message

Tianrui Zhao April 27, 2023, 7:26 a.m. UTC
Add kvm.c and kvm-stub.c into meson.build to compile
it when kvm is configed. Meanwhile in meson.build,
we set the kvm_targets to loongarch64-softmmu when
the cpu is loongarch.

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
---
 meson.build                  | 2 ++
 target/loongarch/meson.build | 1 +
 2 files changed, 3 insertions(+)

Comments

Richard Henderson May 3, 2023, 6:24 a.m. UTC | #1
On 4/27/23 08:26, Tianrui Zhao wrote:
> Add kvm.c and kvm-stub.c into meson.build to compile
> it when kvm is configed. Meanwhile in meson.build,
> we set the kvm_targets to loongarch64-softmmu when
> the cpu is loongarch.
> 
> Signed-off-by: Tianrui Zhao<zhaotianrui@loongson.cn>
> ---
>   meson.build                  | 2 ++
>   target/loongarch/meson.build | 1 +
>   2 files changed, 3 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index b1b29299da..db11f9e2e7 100644
--- a/meson.build
+++ b/meson.build
@@ -114,6 +114,8 @@  elif cpu in ['mips', 'mips64']
   kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu']
 elif cpu in ['riscv']
   kvm_targets = ['riscv32-softmmu', 'riscv64-softmmu']
+elif cpu in ['loongarch64']
+  kvm_targets = ['loongarch64-softmmu']
 else
   kvm_targets = []
 endif
diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build
index 9293a8ab78..0c6cec81e4 100644
--- a/target/loongarch/meson.build
+++ b/target/loongarch/meson.build
@@ -26,6 +26,7 @@  loongarch_softmmu_ss.add(files(
 
 common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])
 
+loongarch_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
 loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss])
 
 target_arch += {'loongarch': loongarch_ss}