From patchwork Mon Aug 17 14:36:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276288 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00E23C433E4 for ; Mon, 17 Aug 2020 15:21:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2334207D3 for ; Mon, 17 Aug 2020 15:21:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B/msVHgV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2334207D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7gwz-0007wI-Ul for qemu-devel@archiver.kernel.org; Mon, 17 Aug 2020 11:21:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7gHg-0005XS-OW for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:38:48 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:33587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7gHe-0006Go-OC for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:38:48 -0400 Received: by mail-wr1-x435.google.com with SMTP id p20so15285736wrf.0 for ; Mon, 17 Aug 2020 07:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z5txgW2pBwpTpCBc6Ym1NOtBUVIzfRB/CfXeEdnGCFg=; b=B/msVHgVmS12c02Q+Ob4jGecFCE469+m1qcyjvvjUc7GPYztFt+FFU8vasBmM9YWXz GfjZ4za2bkB3EuHiRU9JexqdFmG+DX9mdDY3eypABkK2xf7su5/7ZBEABEvlfSp4pb5z PAB8wdqWGoQnmkEbdj0kE7BnjiRXjnO9Xg3oCgEAPFduDwO+nxgZDWfMLxdPuURBZmkQ PkRYfrEEVpzulIj+behFZ5YdXUgk4E0VMaDDzr+4HUDovxuJ2AuJ1VvBe/PnxHb+3sv2 XHuEXEYACy8EudvGEHwo+v4sOUEDGlEJjb2EC0ZQf8/VeUXPoP7UpxSySOBfp//JSpkP P2yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Z5txgW2pBwpTpCBc6Ym1NOtBUVIzfRB/CfXeEdnGCFg=; b=oAM4awaygxMPf03LDbojtybAwoSwjbyu5nrhFXeFqbd4pPB2kgmFIgHAwEgUde/yj0 +U0NzLNDKWOZnQ8d+IGk8tmO0mnU9Ay3212ViYfiAgMEsDLrTkaf09htzOEPI+nNqIaA h+3I4Z2DofU8BMTNvLGwD61Xwnk3eqQG94cvOl1F82jmW+1ards9mI5fj2QwxOWgDWOZ m1+Vq81JlBoXhaW2rnpV6egJj2KK+zk3GTkUUNzt87H+aSRDM8gb+O3vO5zsbgKaXASv TEVkUtGZ7oNBGUqDkLDX13ayARXlw0eIrOeCct8rq2aL8uz9VUmSxWToyPbzQtYwXcP1 rKXA== X-Gm-Message-State: AOAM531XbL4z8iY69JoSKc7OoEz46Ebdu7E8ychM5vn9lCLzs1ZU/Gnv CC2w6C7tmnApcRMzPxCgu/Ryi9ArvYU= X-Google-Smtp-Source: ABdhPJy3HU0iJ8COi5FZK+Dsdb5ZcplwB1Y+UOY6WeqfQ2qjNOY5j8UuBDpLpWz7bOyRGYMkI1cOwQ== X-Received: by 2002:adf:e647:: with SMTP id b7mr16946532wrn.220.1597675124998; Mon, 17 Aug 2020 07:38:44 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:a0d1:fc42:c610:f977]) by smtp.gmail.com with ESMTPSA id i22sm34966603wrb.45.2020.08.17.07.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 07:38:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 080/150] meson: convert backends directory to Meson Date: Mon, 17 Aug 2020 16:36:13 +0200 Message-Id: <20200817143723.343284-81-pbonzini@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817143723.343284-1-pbonzini@redhat.com> References: <20200817143723.343284-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 2 -- backends/Makefile.objs | 23 ----------------------- backends/meson.build | 19 +++++++++++++++++++ backends/tpm/Makefile.objs | 4 ---- backends/tpm/meson.build | 8 ++++++++ configure | 2 ++ meson.build | 5 +++++ 7 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 backends/Makefile.objs create mode 100644 backends/meson.build delete mode 100644 backends/tpm/Makefile.objs create mode 100644 backends/tpm/meson.build diff --git a/Makefile.objs b/Makefile.objs index f2700442a4..c00851a0cd 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -66,8 +66,6 @@ common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF common-obj-y += hw/ common-obj-m += hw/ -common-obj-y += backends/ - common-obj-y += qapi/ common-obj-y += libqmp.fa diff --git a/backends/Makefile.objs b/backends/Makefile.objs deleted file mode 100644 index 22d204cb48..0000000000 --- a/backends/Makefile.objs +++ /dev/null @@ -1,23 +0,0 @@ -common-obj-y += rng.o rng-egd.o rng-builtin.o -common-obj-$(CONFIG_POSIX) += rng-random.o - -common-obj-$(CONFIG_TPM) += tpm/ - -common-obj-y += hostmem.o hostmem-ram.o -common-obj-$(CONFIG_POSIX) += hostmem-file.o - -common-obj-y += cryptodev.o -common-obj-y += cryptodev-builtin.o - -ifeq ($(CONFIG_VIRTIO_CRYPTO),y) -common-obj-y += cryptodev-vhost.o -common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o -endif - -common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o - -common-obj-$(CONFIG_LINUX) += hostmem-memfd.o - -common-obj-$(CONFIG_GIO) += dbus-vmstate.o -dbus-vmstate.o-cflags = $(GIO_CFLAGS) -dbus-vmstate.o-libs = $(GIO_LIBS) diff --git a/backends/meson.build b/backends/meson.build new file mode 100644 index 0000000000..484456ece7 --- /dev/null +++ b/backends/meson.build @@ -0,0 +1,19 @@ +softmmu_ss.add([files( + 'cryptodev-builtin.c', + 'cryptodev.c', + 'hostmem-ram.c', + 'hostmem.c', + 'rng-builtin.c', + 'rng-egd.c', + 'rng.c', +), numa]) + +softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c')) +softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c')) +softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c')) +softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: files('vhost-user.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c')) +softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_true: files('cryptodev-vhost-user.c')) +softmmu_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus-vmstate.c'), gio]) + +subdir('tpm') diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs deleted file mode 100644 index db2731f634..0000000000 --- a/backends/tpm/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -common-obj-y += tpm_backend.o -common-obj-y += tpm_util.o -common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o -common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o diff --git a/backends/tpm/meson.build b/backends/tpm/meson.build new file mode 100644 index 0000000000..857929082e --- /dev/null +++ b/backends/tpm/meson.build @@ -0,0 +1,8 @@ +tpm_ss = ss.source_set() + +tpm_ss.add(files('tpm_backend.c')) +tpm_ss.add(files('tpm_util.c')) +tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c')) +tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c')) + +softmmu_ss.add_all(when: 'CONFIG_TPM', if_true: tpm_ss) diff --git a/configure b/configure index dd1f039554..ad58d67863 100755 --- a/configure +++ b/configure @@ -4692,6 +4692,7 @@ EOF if compile_prog "" "-lnuma" ; then numa=yes libs_softmmu="-lnuma $libs_softmmu" + numa_libs="-lnuma" else if test "$numa" = "yes" ; then feature_not_found "numa" "install numactl devel" @@ -8318,6 +8319,7 @@ fi if test "$numa" = "yes"; then echo "CONFIG_NUMA=y" >> $config_host_mak + echo "NUMA_LIBS=$numa_libs" >> $config_host_mak fi if test "$ccache_cpp2" = "yes"; then diff --git a/meson.build b/meson.build index 207a47cf07..dd80401d11 100644 --- a/meson.build +++ b/meson.build @@ -317,6 +317,10 @@ rdma = not_found if 'CONFIG_RDMA' in config_host rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split()) endif +numa = not_found +if 'CONFIG_NUMA' in config_host + numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -664,6 +668,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')]) common_ss.add(files('cpus-common.c')) subdir('softmmu') +subdir('backends') subdir('migration') subdir('monitor') subdir('net')