]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/loongarch: Add loongarch kvm into meson build
authorTianrui Zhao <zhaotianrui@loongson.cn>
Fri, 5 Jan 2024 07:58:04 +0000 (15:58 +0800)
committerSong Gao <gaosong@loongson.cn>
Thu, 11 Jan 2024 11:22:47 +0000 (19:22 +0800)
Add kvm.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. And fix the compiling error when config
is enable-kvm,disable-tcg.

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
Signed-off-by: xianglai li <lixianglai@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20240105075804.1228596-10-zhaotianrui@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
meson.build
target/loongarch/kvm/meson.build [new file with mode: 0644]
target/loongarch/meson.build

index b0dd87b8f8a1e7856607055376100fa5e24e99d0..2e0c2eaaa7276ed8e9728f9974186e2b0ea82420 100644 (file)
@@ -229,6 +229,8 @@ elif cpu in ['riscv32']
   kvm_targets = ['riscv32-softmmu']
 elif cpu in ['riscv64']
   kvm_targets = ['riscv64-softmmu']
+elif cpu in ['loongarch64']
+  kvm_targets = ['loongarch64-softmmu']
 else
   kvm_targets = []
 endif
diff --git a/target/loongarch/kvm/meson.build b/target/loongarch/kvm/meson.build
new file mode 100644 (file)
index 0000000..2266de6
--- /dev/null
@@ -0,0 +1 @@
+loongarch_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
index e84e4c51f49d55e765fd6b7606c6057fe0736893..db310f60222a33885a7bff638c908e46264c7d53 100644 (file)
@@ -18,3 +18,4 @@ subdir('tcg')
 
 target_arch += {'loongarch': loongarch_ss}
 target_system_arch += {'loongarch': loongarch_system_ss}
+subdir('kvm')