From nobody Tue Dec 16 11:13:15 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1597080432; cv=none; d=zohomail.com; s=zohoarc; b=LHTXlgDoslLqpViTP7IXjuy4k2KpBdrBK8nS3Nqri8ljFMBZr8q8qjxqr4FCuYhsVIJPxJ9YKSLVNKjWYqBCRcI3WuqGHWOvnWXef0HLVqAUDOnohn5bKLy3bXko+F0P23WeP8tSugLsRitVn8F5PdJq3fTsmi5b4WMGfW84Z4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597080432; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8IENvS6W6sUTP+SsAb7DRIXJIokhmnNYgULMJ41YEzw=; b=k3Qb1geTbxwmmCRwk4+Y2WbaBfzTRyZo4SbUnROr/gaf1n7o1qXql9/bRM5dimUqLp05JmEjyuQTrnEAIJFhSwwl+RcLh1NnLW2bFsyWmEFbKyL4lrIIU8vwJxWtkeUXfo8YHWxcfi0tvlwpwbw87KX1j4xX5/e10OJae9xJ0eY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597080432656772.1039953167071; Mon, 10 Aug 2020 10:27:12 -0700 (PDT) Received: from localhost ([::1]:58272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5BZn-0007H8-Ff for importer@patchew.org; Mon, 10 Aug 2020 13:27:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5BJM-00076q-80 for qemu-devel@nongnu.org; Mon, 10 Aug 2020 13:10:12 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:33919 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k5BJJ-0002o6-Uq for qemu-devel@nongnu.org; Mon, 10 Aug 2020 13:10:11 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-337-fpthtMIHO168e52SwoZhDg-1; Mon, 10 Aug 2020 13:10:06 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85F8C1030C20 for ; Mon, 10 Aug 2020 17:10:05 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 938085F1E9; Mon, 10 Aug 2020 17:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597079409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8IENvS6W6sUTP+SsAb7DRIXJIokhmnNYgULMJ41YEzw=; b=Ni1TqXy0FAXith4l8oq47DuTKFhTN3JiRQ57Vk5+XbcAjt+fOHovNUX5HwyAOeN4OGLb70 zc0XT7y/qeCyIc7wLGEapOshLZPEacdN/fC/i+Bh/EaWM+bUYvIEUqlHfnciSFdEmx26o/ HTz6eZFVrlgr5I9jocQoydKurRS6xQs= X-MC-Unique: fpthtMIHO168e52SwoZhDg-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 033/147] contrib/vhost-user-gpu: convert to meson Date: Mon, 10 Aug 2020 19:07:11 +0200 Message-Id: <1597079345-42801-34-git-send-email-pbonzini@redhat.com> In-Reply-To: <1597079345-42801-1-git-send-email-pbonzini@redhat.com> References: <1597079345-42801-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 04:13:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham 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=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- Makefile | 18 +----------------- Makefile.objs | 1 - contrib/vhost-user-gpu/Makefile.objs | 10 ---------- contrib/vhost-user-gpu/meson.build | 13 +++++++++++++ meson.build | 15 +++++++++++++++ rules.mak | 7 ------- 6 files changed, 29 insertions(+), 35 deletions(-) delete mode 100644 contrib/vhost-user-gpu/Makefile.objs create mode 100644 contrib/vhost-user-gpu/meson.build diff --git a/Makefile b/Makefile index dd7b99e..750598c 100644 --- a/Makefile +++ b/Makefile @@ -179,16 +179,10 @@ $(call set-vpath, $(SRC_PATH)) =20 LIBS+=3D-lz $(LIBS_TOOLS) =20 -vhost-user-json-y =3D HELPERS-y =3D $(HELPERS) =20 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) +=3D qemu-bridge-he= lper$(EXESUF) =20 -ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy) -HELPERS-y +=3D vhost-user-gpu$(EXESUF) -vhost-user-json-y +=3D contrib/vhost-user-gpu/50-qemu-gpu.json -endif - # Sphinx does not allow building manuals into the same directory as # the source files, so if we're doing an in-tree QEMU build we must # build the manuals into a subdirectory (and then install them from @@ -295,7 +289,6 @@ dummy :=3D $(call unnest-vars,, \ elf2dmp-obj-y \ ivshmem-client-obj-y \ ivshmem-server-obj-y \ - vhost-user-gpu-obj-y \ qga-vss-dll-obj-y \ block-obj-y \ block-obj-m \ @@ -309,7 +302,7 @@ dummy :=3D $(call unnest-vars,, \ =20 include $(SRC_PATH)/tests/Makefile.include =20 -all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-= all modules $(vhost-user-json-y) +all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-= all modules =20 qemu-version.h: FORCE $(call quiet-command, \ @@ -515,9 +508,6 @@ ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMM= ON_LDADDS) $(call LINK, $^) endif =20 -vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/lib= vhost-user.a $(COMMON_LDADDS) - $(call LINK, $^) - module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak $(call quiet-command,$(PYTHON) $< $@ \ $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ @@ -711,12 +701,6 @@ endif ifneq ($(HELPERS-y),) $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) endif -ifneq ($(vhost-user-json-y),) - $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/vhost-user/" - for x in $(vhost-user-json-y); do \ - $(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)/vhost-user/"; \ - done -endif ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) endif diff --git a/Makefile.objs b/Makefile.objs index 0922c3ed..2f2d4b2 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -106,6 +106,5 @@ qga-vss-dll-obj-y =3D qga/ elf2dmp-obj-y =3D contrib/elf2dmp/ ivshmem-client-obj-$(CONFIG_IVSHMEM) =3D contrib/ivshmem-client/ ivshmem-server-obj-$(CONFIG_IVSHMEM) =3D contrib/ivshmem-server/ -vhost-user-gpu-obj-y =3D contrib/vhost-user-gpu/ =20 ###################################################################### diff --git a/contrib/vhost-user-gpu/Makefile.objs b/contrib/vhost-user-gpu/= Makefile.objs deleted file mode 100644 index 0929609..0000000 --- a/contrib/vhost-user-gpu/Makefile.objs +++ /dev/null @@ -1,10 +0,0 @@ -vhost-user-gpu-obj-y =3D vhost-user-gpu.o virgl.o vugbm.o - -vhost-user-gpu.o-cflags :=3D $(PIXMAN_CFLAGS) $(GBM_CFLAGS) -vhost-user-gpu.o-libs :=3D $(PIXMAN_LIBS) - -virgl.o-cflags :=3D $(VIRGL_CFLAGS) $(GBM_CFLAGS) -virgl.o-libs :=3D $(VIRGL_LIBS) - -vugbm.o-cflags :=3D $(GBM_CFLAGS) -vugbm.o-libs :=3D $(GBM_LIBS) diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/me= son.build new file mode 100644 index 0000000..6c1459f --- /dev/null +++ b/contrib/vhost-user-gpu/meson.build @@ -0,0 +1,13 @@ +if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \ + and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host + executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm= .c'), + link_with: libvhost_user, + dependencies: [qemuutil, pixman, gbm, virgl], + install: true, + install_dir: get_option('libexecdir')) + + configure_file(input: '50-qemu-gpu.json.in', + output: '50-qemu-gpu.json', + configuration: config_host, + install_dir: config_host['qemu_datadir'] / 'vhost-user') +endif diff --git a/meson.build b/meson.build index 80966cc..3483056 100644 --- a/meson.build +++ b/meson.build @@ -79,6 +79,8 @@ if 'CONFIG_GNUTLS' in config_host gnutls =3D declare_dependency(compile_args: config_host['GNUTLS_CFLAGS']= .split(), link_args: config_host['GNUTLS_LIBS'].split(= )) endif +pixman =3D declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].s= plit(), + link_args: config_host['PIXMAN_LIBS'].split()) seccomp =3D not_found if 'CONFIG_SECCOMP' in config_host seccomp =3D declare_dependency(compile_args: config_host['SECCOMP_CFLAGS= '].split(), @@ -93,6 +95,16 @@ if 'CONFIG_LIBISCSI' in config_host libiscsi =3D declare_dependency(compile_args: config_host['LIBISCSI_CFLA= GS'].split(), link_args: config_host['LIBISCSI_LIBS'].sp= lit()) endif +gbm =3D not_found +if 'CONFIG_GBM' in config_host + gbm =3D declare_dependency(compile_args: config_host['GBM_CFLAGS'].split= (), + link_args: config_host['GBM_LIBS'].split()) +endif +virgl =3D not_found +if 'CONFIG_VIRGL' in config_host + virgl =3D declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].s= plit(), + link_args: config_host['VIRGL_LIBS'].split()) +endif =20 target_dirs =3D config_host['TARGET_DIRS'].split() have_user =3D false @@ -261,6 +273,9 @@ if have_tools if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') subdir('contrib/vhost-user-blk') + if 'CONFIG_LINUX' in config_host + subdir('contrib/vhost-user-gpu') + endif subdir('contrib/vhost-user-input') subdir('contrib/vhost-user-scsi') endif diff --git a/rules.mak b/rules.mak index 7aefd37..1aa6394 100644 --- a/rules.mak +++ b/rules.mak @@ -402,13 +402,6 @@ TEXI2MAN =3D $(call quiet-command, \ %.8: $(call TEXI2MAN) =20 -GEN_SUBST =3D $(call quiet-command, \ - sed -e "s!@libexecdir@!$(libexecdir)!g" < $< > $@, \ - "GEN","$@") - -%.json: %.json.in - $(call GEN_SUBST) - # Support for building multiple output files by atomically executing # a single rule which depends on several input files (so the rule # will be executed exactly once, not once per output file, and --=20 1.8.3.1