From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992200482426.41384938644933; Thu, 17 Jun 2021 21:56:40 -0700 (PDT) Received: from localhost ([::1]:36404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6YZ-0006HS-2X for importer@patchew.org; Fri, 18 Jun 2021 00:56:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WK-0003RD-PZ for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WH-0003TE-PB for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:19 -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-362-9LO1q8FzOJC28fs1UN6fjQ-1; Fri, 18 Jun 2021 00:54:15 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF70DFC9D; Fri, 18 Jun 2021 04:54:13 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 78F6C5D9CC; Fri, 18 Jun 2021 04:53:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F318E1800D7B; Fri, 18 Jun 2021 06:53:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992056; 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=bPUwOMaFMUh5eVDQPE9lx5VShQQ3ydFde10iSZQRwDg=; b=Ho665vjzKw7zHiL6+fQqUdhANXE6Ue3wyxLY9sGvp35xpi+M7RaCDrh1APBepjSXDnjVui uP49BptKT6Q3c+Kk138V+Vl4RAZ/zJS3SnwtgXpXng04UgD0XiCdn7LsWn9HxaND0D0WSl NZnvQt7ix5AXxzHLmQG2nezOVQy+mD4= X-MC-Unique: 9LO1q8FzOJC28fs1UN6fjQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 01/24] modules: add modinfo macros Date: Fri, 18 Jun 2021 06:53:30 +0200 Message-Id: <20210618045353.2510174-2-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add macros for module info annotations. Instead of having that module meta-data stored in lists in util/module.c place directly in the module source code. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 944d403cbd15..81ef086da023 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -73,4 +73,29 @@ bool module_load_one(const char *prefix, const char *lib= _name, bool mayfail); void module_load_qom_one(const char *type); void module_load_qom_all(void); =20 +/* + * module info annotation macros + * + * scripts/modinfo-collect.py will collect module info, + * using the preprocessor and -DQEMU_MODINFO + */ +#ifdef QEMU_MODINFO +# define modinfo(kind, value) \ + MODINFO_START kind value MODINFO_END +#else +# define modinfo(kind, value) +#endif + +/* module implements QOM type */ +#define module_obj(name) modinfo(obj, name) + +/* module has a dependency on */ +#define module_dep(name) modinfo(dep, name) + +/* module is for target architecture */ +#define module_arch(name) modinfo(arch, name) + +/* module registers QemuOpts */ +#define module_opts(name) modinfo(opts, name) + #endif --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992304377167.28611677729816; Thu, 17 Jun 2021 21:58:24 -0700 (PDT) Received: from localhost ([::1]:45030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6aF-0003jU-C5 for importer@patchew.org; Fri, 18 Jun 2021 00:58:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WM-0003RK-Qm for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WK-0003X7-7o for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:22 -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-573-Hk157ZyFMc2tiYsA9czDog-1; Fri, 18 Jun 2021 00:54:16 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 37113100A8F1; Fri, 18 Jun 2021 04:54:15 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3E1F5D9CC; Fri, 18 Jun 2021 04:54:14 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0BFC618017C9; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992059; 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=b0Wp5YRWvy+e9AOuNE8Ki93asQ8A+Bl2HfigdF+Qyd4=; b=ARbHPnOmptjXb06pp1WGFDlBcJTMgdnsiPU/iUgdsW6dmhUeQXx3f4/bILpyw2axEnvVSf nDM9rfnE5v/QzIYwMYclqz4D7Jl1xfDm8cjqITSAId2gSjRna6cOjsVWTqAuHQTwCFrpzJ oYurXveVSKKcVIsQgG1TYtcIdxrhdIg= X-MC-Unique: Hk157ZyFMc2tiYsA9czDog-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 02/24] modules: collect module meta-data Date: Fri, 18 Jun 2021 06:53:31 +0200 Message-Id: <20210618045353.2510174-3-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add script to collect the module meta-data from the source code, store the results in *.modinfo files. Signed-off-by: Gerd Hoffmann --- scripts/modinfo-collect.py | 67 ++++++++++++++++++++++++++++++++++++++ meson.build | 11 +++++++ 2 files changed, 78 insertions(+) create mode 100755 scripts/modinfo-collect.py diff --git a/scripts/modinfo-collect.py b/scripts/modinfo-collect.py new file mode 100755 index 000000000000..4acb188c3e89 --- /dev/null +++ b/scripts/modinfo-collect.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import os +import sys +import json +import shlex +import subprocess + +def find_command(src, target, compile_commands): + for command in compile_commands: + if command['file'] !=3D src: + continue + if target !=3D '' and command['command'].find(target) =3D=3D -1: + continue + return command['command'] + return 'false' + +def process_command(src, command): + skip =3D False + arg =3D False + out =3D [] + for item in shlex.split(command): + if arg: + out.append(x) + arg =3D False + continue + if skip: + skip =3D False + continue + if item =3D=3D '-MF' or item =3D=3D '-MQ' or item =3D=3D '-o': + skip =3D True + continue + if item =3D=3D '-c': + skip =3D True + continue + out.append(item) + out.append('-DQEMU_MODINFO') + out.append('-E') + out.append(src) + return out + +def main(args): + target =3D '' + if args[0] =3D=3D '--target': + args.pop(0) + target =3D args.pop(0) + print("MODINFO_DEBUG target %s" % target) + arch =3D target[:-8] # cut '-softmmu' + print("MODINFO_START arch \"%s\" MODINFO_END" % arch) + with open('compile_commands.json') as f: + compile_commands =3D json.load(f) + for src in args: + print("MODINFO_DEBUG src %s" % src) + command =3D find_command(src, target, compile_commands) + cmdline =3D process_command(src, command) + print("MODINFO_DEBUG cmd", cmdline) + result =3D subprocess.run(cmdline, stdout =3D subprocess.PIPE, + universal_newlines =3D True) + if result.returncode !=3D 0: + sys.exit(result.returncode) + for line in result.stdout.split('\n'): + if line.find('MODINFO') !=3D -1: + print(line) + +if __name__ =3D=3D "__main__": + main(sys.argv[1:]) diff --git a/meson.build b/meson.build index a2311eda6ec5..bb99619257d5 100644 --- a/meson.build +++ b/meson.build @@ -2021,6 +2021,9 @@ subdir('tests/qtest/fuzz') # Library dependencies # ######################## =20 +modinfo_collect =3D find_program('scripts/modinfo-collect.py') +modinfo_files =3D [] + block_mods =3D [] softmmu_mods =3D [] foreach d, list : modules @@ -2034,6 +2037,14 @@ foreach d, list : modules else softmmu_mods +=3D sl endif + if module_ss.sources() !=3D [] + modinfo_files +=3D custom_target(d + '-' + m + '.modinfo', + output: d + '-' + m + '.modinfo', + input: module_ss.sources(), + capture: true, + build_by_default: true, # to be rem= oved when added to a target + command: [modinfo_collect, '@INPUT@= ']) + endif else if d =3D=3D 'block' block_ss.add_all(module_ss) --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992478926915.5047840462216; Thu, 17 Jun 2021 22:01:18 -0700 (PDT) Received: from localhost ([::1]:55352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6d3-00026u-Rv for importer@patchew.org; Fri, 18 Jun 2021 01:01:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WT-0003dW-Mb for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WR-0003dS-IH for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:29 -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-209-jlTQf4NeN1KRWyC8iJWqMg-1; Fri, 18 Jun 2021 00:54:25 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 15E6C100C61B; Fri, 18 Jun 2021 04:54:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D97E60CC9; Fri, 18 Jun 2021 04:54:15 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1E98118017CA; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992066; 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=JCUWrxNmAkjEjg0HSsp6x5R3nta4EBqXkD3CLyv0OkU=; b=AHG2xqVTTo0rUOg/vIm6AiR5+gXk0vayrRTw+seF73e2OofM+lt8JZVqqvQ/GHhMUFbKEx QuVh7LVO5GZX1sJcG33tPAkfhanPyR8o8uYzpHkiLnu3y7eFuCrmtqy8ROtOzKRFB5/yO2 mT8ieGQBt6g1N2n0cR7vJTs9xkb9JHo= X-MC-Unique: jlTQf4NeN1KRWyC8iJWqMg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 03/24] modules: generate modinfo.c Date: Fri, 18 Jun 2021 06:53:32 +0200 Message-Id: <20210618045353.2510174-4-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add script to generate C source with a small database containing the module meta-data. Signed-off-by: Gerd Hoffmann --- scripts/modinfo-generate.py | 84 +++++++++++++++++++++++++++++++++++++ include/qemu/module.h | 17 ++++++++ softmmu/vl.c | 4 ++ util/module.c | 11 +++++ meson.build | 13 +++++- 5 files changed, 128 insertions(+), 1 deletion(-) create mode 100755 scripts/modinfo-generate.py diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py new file mode 100755 index 000000000000..2b925432655a --- /dev/null +++ b/scripts/modinfo-generate.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import os +import sys + +def print_array(name, values): + if len(values) =3D=3D 0: + return + list =3D ", ".join(values) + print(" .%s =3D ((const char*[]){ %s, NULL })," % (name, list)) + +def parse_line(line): + kind =3D "" + data =3D "" + get_kind =3D False + get_data =3D False + for item in line.split(): + if item =3D=3D "MODINFO_START": + get_kind =3D True + continue + if item.startswith("MODINFO_END"): + get_data =3D False + continue + if get_kind: + kind =3D item + get_kind =3D False + get_data =3D True + continue + if get_data: + data +=3D " " + item + continue + return (kind, data) + +def generate(name, lines): + arch =3D "" + objs =3D [] + deps =3D [] + opts =3D [] + for line in lines: + if line.find("MODINFO_START") !=3D -1: + (kind, data) =3D parse_line(line) + if kind =3D=3D 'obj': + objs.append(data) + elif kind =3D=3D 'dep': + deps.append(data) + elif kind =3D=3D 'opts': + opts.append(data) + elif kind =3D=3D 'arch': + arch =3D data; + else: + print("unknown:", kind) + exit(1) + + print(" .name =3D \"%s\"," % name) + if arch !=3D "": + print(" .arch =3D %s," % arch) + print_array("objs", objs) + print_array("deps", deps) + print_array("opts", opts) + print("},{"); + +def print_pre(): + print("/* generated by scripts/modinfo.py */") + print("#include \"qemu/osdep.h\"") + print("#include \"qemu/module.h\"") + print("const QemuModinfo qemu_modinfo[] =3D {{") + +def print_post(): + print(" /* end of list */") + print("}};") + +def main(args): + print_pre() + for modinfo in args: + with open(modinfo) as f: + lines =3D f.readlines() + print(" /* %s */" % modinfo) + (basename, ext) =3D os.path.splitext(modinfo) + generate(basename, lines) + print_post() + +if __name__ =3D=3D "__main__": + main(sys.argv[1:]) diff --git a/include/qemu/module.h b/include/qemu/module.h index 81ef086da023..a98748d501d3 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -98,4 +98,21 @@ void module_load_qom_all(void); /* module registers QemuOpts */ #define module_opts(name) modinfo(opts, name) =20 +/* + * module info database + * + * scripts/modinfo-generate.c will build this using the data collected + * by scripts/modinfo-collect.py + */ +typedef struct QemuModinfo QemuModinfo; +struct QemuModinfo { + const char *name; + const char *arch; + const char **objs; + const char **deps; + const char **opts; +}; +extern const QemuModinfo qemu_modinfo[]; +void module_init_info(const QemuModinfo *info); + #endif diff --git a/softmmu/vl.c b/softmmu/vl.c index 326c1e908008..a4857ec43ff3 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2740,6 +2740,10 @@ void qemu_init(int argc, char **argv, char **envp) error_init(argv[0]); qemu_init_exec_dir(argv[0]); =20 +#ifdef CONFIG_MODULES + module_init_info(qemu_modinfo); +#endif + qemu_init_subsystems(); =20 /* first pass of option parsing */ diff --git a/util/module.c b/util/module.c index eee8ff2de136..8d3e8275b9f7 100644 --- a/util/module.c +++ b/util/module.c @@ -110,6 +110,17 @@ void module_call_init(module_init_type type) } =20 #ifdef CONFIG_MODULES + +static const QemuModinfo module_info_stub[] =3D { { + /* end of list */ +} }; +static const QemuModinfo *module_info =3D module_info_stub; + +void module_init_info(const QemuModinfo *info) +{ + module_info =3D info; +} + static int module_load_file(const char *fname, bool mayfail, bool export_s= ymbols) { GModule *g_module; diff --git a/meson.build b/meson.build index bb99619257d5..9cf50a50d39a 100644 --- a/meson.build +++ b/meson.build @@ -2022,6 +2022,7 @@ subdir('tests/qtest/fuzz') ######################## =20 modinfo_collect =3D find_program('scripts/modinfo-collect.py') +modinfo_generate =3D find_program('scripts/modinfo-generate.py') modinfo_files =3D [] =20 block_mods =3D [] @@ -2042,7 +2043,6 @@ foreach d, list : modules output: d + '-' + m + '.modinfo', input: module_ss.sources(), capture: true, - build_by_default: true, # to be rem= oved when added to a target command: [modinfo_collect, '@INPUT@= ']) endif else @@ -2055,6 +2055,17 @@ foreach d, list : modules endforeach endforeach =20 +if enable_modules + modinfo_src =3D custom_target('modinfo.c', + output: 'modinfo.c', + input: modinfo_files, + command: [modinfo_generate, '@INPUT@'], + capture: true) + modinfo_lib =3D static_library('modinfo', modinfo_src) + modinfo_dep =3D declare_dependency(link_whole: modinfo_lib) + softmmu_ss.add(modinfo_dep) +endif + nm =3D find_program('nm') undefsym =3D find_program('scripts/undefsym.py') block_syms =3D custom_target('block.syms', output: 'block.syms', --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992326220578.20256036209; Thu, 17 Jun 2021 21:58:46 -0700 (PDT) Received: from localhost ([::1]:46748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6ab-0004rR-6d for importer@patchew.org; Fri, 18 Jun 2021 00:58:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WS-0003bA-R8 for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39528) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WQ-0003cx-27 for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:28 -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-30--kFnDnszMxKDPkCXa5WERw-1; Fri, 18 Jun 2021 00:54:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07A08802B4F; Fri, 18 Jun 2021 04:54:23 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A7F55D9CC; Fri, 18 Jun 2021 04:54:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 29ACF18017CB; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992065; 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=XDqu+Mr4Kzkxd3V/po/u+EwcZ0cPcIem552ZNdNRcDI=; b=GgJd/ey9XAeOx2+R6b7h/thP9NfPxvTlnxLe6rPjdcpZjEMC8K7klkaVzH2Kq99RIhiUDo mAvTnFDJaM7YGX+8CIuNunv8j3ntU7UkIN0TFQZbwerut2UIjRaggPJte4xXq+XIrqTb2G h2I2TOHgnC7VXVVZ50Ve2O6p04XXCvA= X-MC-Unique: -kFnDnszMxKDPkCXa5WERw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 04/24] modules: add qxl module annotations Date: Fri, 18 Jun 2021 06:53:33 +0200 Message-Id: <20210618045353.2510174-5-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 6e1f8ff1b2a7..84f99088e0a0 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2522,6 +2522,7 @@ static const TypeInfo qxl_primary_info =3D { .parent =3D TYPE_PCI_QXL, .class_init =3D qxl_primary_class_init, }; +module_obj("qxl-vga"); =20 static void qxl_secondary_class_init(ObjectClass *klass, void *data) { @@ -2538,6 +2539,7 @@ static const TypeInfo qxl_secondary_info =3D { .parent =3D TYPE_PCI_QXL, .class_init =3D qxl_secondary_class_init, }; +module_obj("qxl"); =20 static void qxl_register_types(void) { @@ -2547,3 +2549,5 @@ static void qxl_register_types(void) } =20 type_init(qxl_register_types) + +module_dep("ui-spice-core"); --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992599677158.90843517701205; Thu, 17 Jun 2021 22:03:19 -0700 (PDT) Received: from localhost ([::1]:36684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6f0-00005I-LZ for importer@patchew.org; Fri, 18 Jun 2021 01:03:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wd-0003q5-SS for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6WY-0003jd-UZ for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:39 -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-581-mQ3JwwOTOnmmwx4TQnU8Yw-1; Fri, 18 Jun 2021 00:54:33 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7231210C1ADC; Fri, 18 Jun 2021 04:54:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93BDA5D9CD; Fri, 18 Jun 2021 04:54:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4558F18017CC; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992074; 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=tCfphQnaNiqR1/QATqQu0QjJBywC8Yh+FbFnjQ/wVks=; b=MlIzcWyEg56xNPWsJ++FMb0MsO8kGFH1HqcKa6jUIA0ECgzwxAOIxOYfBnfbCmT6h+tucc 54aJBlcZLFxXlV/YipiUE83X8MKE0AgInarjG6kzU4ZFYYF4VVyy+fBQCTEeiw+lb8R0H0 arngmv6OevxxauCPco17i3h2bvHdXx4= X-MC-Unique: mQ3JwwOTOnmmwx4TQnU8Yw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 05/24] modules: add virtio-gpu module annotations Date: Fri, 18 Jun 2021 06:53:34 +0200 Message-Id: <20210618045353.2510174-6-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost-user-vga.c | 1 + hw/display/virtio-gpu-base.c | 1 + hw/display/virtio-gpu-gl.c | 3 +++ hw/display/virtio-gpu-pci-gl.c | 3 +++ hw/display/virtio-gpu-pci.c | 2 ++ hw/display/virtio-gpu.c | 1 + hw/display/virtio-vga-gl.c | 3 +++ hw/display/virtio-vga.c | 2 ++ 10 files changed, 18 insertions(+) diff --git a/hw/display/vhost-user-gpu-pci.c b/hw/display/vhost-user-gpu-pc= i.c index a02b23ecaf11..daefcf710159 100644 --- a/hw/display/vhost-user-gpu-pci.c +++ b/hw/display/vhost-user-gpu-pci.c @@ -43,6 +43,7 @@ static const VirtioPCIDeviceTypeInfo vhost_user_gpu_pci_i= nfo =3D { .instance_size =3D sizeof(VhostUserGPUPCI), .instance_init =3D vhost_user_gpu_pci_initfn, }; +module_obj(TYPE_VHOST_USER_GPU_PCI); =20 static void vhost_user_gpu_pci_register_types(void) { diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 6cdaa1c73b9b..32ef0061f924 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -596,6 +596,7 @@ static const TypeInfo vhost_user_gpu_info =3D { .instance_finalize =3D vhost_user_gpu_instance_finalize, .class_init =3D vhost_user_gpu_class_init, }; +module_obj(TYPE_VHOST_USER_GPU); =20 static void vhost_user_gpu_register_types(void) { diff --git a/hw/display/vhost-user-vga.c b/hw/display/vhost-user-vga.c index a34a99856d73..072c9c65bc75 100644 --- a/hw/display/vhost-user-vga.c +++ b/hw/display/vhost-user-vga.c @@ -44,6 +44,7 @@ static const VirtioPCIDeviceTypeInfo vhost_user_vga_info = =3D { .instance_size =3D sizeof(VhostUserVGA), .instance_init =3D vhost_user_vga_inst_initfn, }; +module_obj(TYPE_VHOST_USER_VGA); =20 static void vhost_user_vga_register_types(void) { diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index dd294276cb38..c8da4806e0bb 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -256,6 +256,7 @@ static const TypeInfo virtio_gpu_base_info =3D { .class_init =3D virtio_gpu_base_class_init, .abstract =3D true }; +module_obj(TYPE_VIRTIO_GPU_BASE); =20 static void virtio_register_types(void) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c index d971b480806a..7ab93bf8c829 100644 --- a/hw/display/virtio-gpu-gl.c +++ b/hw/display/virtio-gpu-gl.c @@ -154,6 +154,7 @@ static const TypeInfo virtio_gpu_gl_info =3D { .instance_size =3D sizeof(VirtIOGPUGL), .class_init =3D virtio_gpu_gl_class_init, }; +module_obj(TYPE_VIRTIO_GPU_GL); =20 static void virtio_register_types(void) { @@ -161,3 +162,5 @@ static void virtio_register_types(void) } =20 type_init(virtio_register_types) + +module_dep("hw-display-virtio-gpu"); diff --git a/hw/display/virtio-gpu-pci-gl.c b/hw/display/virtio-gpu-pci-gl.c index 902dda345275..99b14a07185e 100644 --- a/hw/display/virtio-gpu-pci-gl.c +++ b/hw/display/virtio-gpu-pci-gl.c @@ -46,6 +46,7 @@ static const VirtioPCIDeviceTypeInfo virtio_gpu_gl_pci_in= fo =3D { .instance_size =3D sizeof(VirtIOGPUGLPCI), .instance_init =3D virtio_gpu_gl_initfn, }; +module_obj(TYPE_VIRTIO_GPU_GL_PCI); =20 static void virtio_gpu_gl_pci_register_types(void) { @@ -53,3 +54,5 @@ static void virtio_gpu_gl_pci_register_types(void) } =20 type_init(virtio_gpu_gl_pci_register_types) + +module_dep("hw-display-virtio-gpu-pci"); diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c index d742a30aecf7..e36eee0c409b 100644 --- a/hw/display/virtio-gpu-pci.c +++ b/hw/display/virtio-gpu-pci.c @@ -64,6 +64,7 @@ static const TypeInfo virtio_gpu_pci_base_info =3D { .class_init =3D virtio_gpu_pci_base_class_init, .abstract =3D true }; +module_obj(TYPE_VIRTIO_GPU_PCI_BASE); =20 #define TYPE_VIRTIO_GPU_PCI "virtio-gpu-pci" typedef struct VirtIOGPUPCI VirtIOGPUPCI; @@ -90,6 +91,7 @@ static const VirtioPCIDeviceTypeInfo virtio_gpu_pci_info = =3D { .instance_size =3D sizeof(VirtIOGPUPCI), .instance_init =3D virtio_gpu_initfn, }; +module_obj(TYPE_VIRTIO_GPU_PCI); =20 static void virtio_gpu_pci_register_types(void) { diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index e183f4ecdaa5..6b7f643951fe 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1427,6 +1427,7 @@ static const TypeInfo virtio_gpu_info =3D { .class_size =3D sizeof(VirtIOGPUClass), .class_init =3D virtio_gpu_class_init, }; +module_obj(TYPE_VIRTIO_GPU); =20 static void virtio_register_types(void) { diff --git a/hw/display/virtio-vga-gl.c b/hw/display/virtio-vga-gl.c index c971340ebb1a..f22549097c5e 100644 --- a/hw/display/virtio-vga-gl.c +++ b/hw/display/virtio-vga-gl.c @@ -36,6 +36,7 @@ static VirtioPCIDeviceTypeInfo virtio_vga_gl_info =3D { .instance_size =3D sizeof(VirtIOVGAGL), .instance_init =3D virtio_vga_gl_inst_initfn, }; +module_obj(TYPE_VIRTIO_VGA_GL); =20 static void virtio_vga_register_types(void) { @@ -45,3 +46,5 @@ static void virtio_vga_register_types(void) } =20 type_init(virtio_vga_register_types) + +module_dep("hw-display-virtio-vga"); diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index d3c640406152..9e57f61e9edb 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -239,6 +239,7 @@ static TypeInfo virtio_vga_base_info =3D { .class_init =3D virtio_vga_base_class_init, .abstract =3D true, }; +module_obj(TYPE_VIRTIO_VGA_BASE); =20 #define TYPE_VIRTIO_VGA "virtio-vga" =20 @@ -268,6 +269,7 @@ static VirtioPCIDeviceTypeInfo virtio_vga_info =3D { .instance_size =3D sizeof(VirtIOVGA), .instance_init =3D virtio_vga_inst_initfn, }; +module_obj(TYPE_VIRTIO_VGA); =20 static void virtio_vga_register_types(void) { --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992440954705.1739348783589; Thu, 17 Jun 2021 22:00:40 -0700 (PDT) Received: from localhost ([::1]:54454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6cR-0001Wd-NH for importer@patchew.org; Fri, 18 Jun 2021 01:00:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wo-000433-2T for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wi-0003qw-UC for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:49 -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-185-1gQhpR_BMFeH-3g_UsYPxA-1; Fri, 18 Jun 2021 00:54:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E72BE3625B; Fri, 18 Jun 2021 04:54:38 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DDEE5C1A1; Fri, 18 Jun 2021 04:54:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 51DF418017CD; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992084; 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=8HVkjQbly3dsiItgADM//9yMkxJsBU/36GStGQA/SeE=; b=HLn11rPidfWvBrQ3IvJih5ph2aU7F/GTCiKhOlQWF+LojpGBDjdZ1EbQ9qJfs6sUbpPscs yKWn2KLWCiH3jr+UgwlPQykVWYIxDupOUGgvSaLcPIi9r5wz7aM/Hq716kLsaq4tD/xOSg EJmzqy6wwgOlqrP/wJvI3bv0XMomX38= X-MC-Unique: 1gQhpR_BMFeH-3g_UsYPxA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 06/24] modules: add chardev module annotations Date: Fri, 18 Jun 2021 06:53:35 +0200 Message-Id: <20210618045353.2510174-7-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- chardev/baum.c | 1 + chardev/spice.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/chardev/baum.c b/chardev/baum.c index 5deca778bc44..79d618e35045 100644 --- a/chardev/baum.c +++ b/chardev/baum.c @@ -680,6 +680,7 @@ static const TypeInfo char_braille_type_info =3D { .instance_finalize =3D char_braille_finalize, .class_init =3D char_braille_class_init, }; +module_obj(TYPE_CHARDEV_BRAILLE); =20 static void register_types(void) { diff --git a/chardev/spice.c b/chardev/spice.c index 1104426e3a11..3ffb3fdc0dac 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -366,6 +366,7 @@ static const TypeInfo char_spice_type_info =3D { .class_init =3D char_spice_class_init, .abstract =3D true, }; +module_obj(TYPE_CHARDEV_SPICE); =20 static void char_spicevmc_class_init(ObjectClass *oc, void *data) { @@ -396,6 +397,7 @@ static const TypeInfo char_spiceport_type_info =3D { .parent =3D TYPE_CHARDEV_SPICE, .class_init =3D char_spiceport_class_init, }; +module_obj(TYPE_CHARDEV_SPICEPORT); =20 static void register_types(void) { @@ -405,3 +407,5 @@ static void register_types(void) } =20 type_init(register_types); + +module_dep("ui-spice-core"); --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992223204697.9872291532891; Thu, 17 Jun 2021 21:57:03 -0700 (PDT) Received: from localhost ([::1]:38514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6Yw-0007pO-3Q for importer@patchew.org; Fri, 18 Jun 2021 00:57:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wp-00049t-Pm for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wo-0003tP-2V for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:51 -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-460-uILz5ItvOhKWfQJV5TcpWQ-1; Fri, 18 Jun 2021 00:54:48 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0D083100CA88; Fri, 18 Jun 2021 04:54:47 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 029D610023B5; Fri, 18 Jun 2021 04:54:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5C8511803092; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992089; 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=rQZiTj29EkUI3JcZ8Wr4DuhMvRhsE3YMv7zgpWxKx8Q=; b=A1WnV+k1u8seTW7DKRaUo78xQ70ViA1smUlez4QUruPns3wCleui84+iHCOmWxXFvUMF7a uPOGfI0Wav2CaH2ckEZazltPhxzOfZoUL5+Rmny3CYaPxztS3VH7mNF3rlbZXCNE+5MUxa 9hafCt93I714pe6H2JcQOeHOKoo8X0s= X-MC-Unique: uILz5ItvOhKWfQJV5TcpWQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 07/24] modules: add audio module annotations Date: Fri, 18 Jun 2021 06:53:36 +0200 Message-Id: <20210618045353.2510174-8-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- audio/spiceaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index 999bfbde47c5..a8d370fe6f31 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -317,3 +317,5 @@ static void register_audio_spice(void) audio_driver_register(&spice_audio_driver); } type_init(register_audio_spice); + +module_dep("ui-spice-core"); --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992330120522.3657217145085; Thu, 17 Jun 2021 21:58:50 -0700 (PDT) Received: from localhost ([::1]:47060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6af-000553-4F for importer@patchew.org; Fri, 18 Jun 2021 00:58:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Ww-0004aC-KX for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wu-0003xf-LS for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:58 -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-170-Dyt5MdrvPTeBPpmW6g-l0A-1; Fri, 18 Jun 2021 00:54:54 -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 75F6A100C609; Fri, 18 Jun 2021 04:54:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81BF75D6AC; Fri, 18 Jun 2021 04:54:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 673421803093; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992096; 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=47S+hKkrRx4hDRMeJz2IyNQwdb7IvNGZaEvXYRCjttw=; b=UBpc+NKvB07DKegbUEqpZ6r9tQcotU6GPDH2rmjaTvOpv446jwB/S0ir+B065kfl1h2U7k 1z1SwEIVid08kuA/MxhnWPLOFSwZAymPd9Lkbnbj0tLLDV7xNZgsG254yHL/Z5eGGHjpUo 6SVTq6jtSdB9I9K7m2L3WV5i9FwZlv8= X-MC-Unique: Dyt5MdrvPTeBPpmW6g-l0A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 08/24] modules: add usb-redir module annotations Date: Fri, 18 Jun 2021 06:53:37 +0200 Message-Id: <20210618045353.2510174-9-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 6a75b0dc4ab2..4ec9326e0582 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2608,6 +2608,7 @@ static const TypeInfo usbredir_dev_info =3D { .class_init =3D usbredir_class_initfn, .instance_init =3D usbredir_instance_init, }; +module_obj(TYPE_USB_REDIR); =20 static void usbredir_register_types(void) { --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992597567873.3934106597012; Thu, 17 Jun 2021 22:03:17 -0700 (PDT) Received: from localhost ([::1]:36480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6ey-0008Ow-8n for importer@patchew.org; Fri, 18 Jun 2021 01:03:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Ww-0004ab-OU for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Wu-0003xc-Q2 for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:54:58 -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-58-HhoJ0YNqPz-vLk0-G1DkkA-1; Fri, 18 Jun 2021 00:54:54 -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 7D7FA36258; Fri, 18 Jun 2021 04:54:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 948C55D6DC; Fri, 18 Jun 2021 04:54:48 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 784671803543; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992096; 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=ynhXTHj1vgTX7K0qlPMPEtoJitMeHYDFd80j2X87xgo=; b=IEdD62NuDeMTGwzObjO2SCt7TqKW3dUrCU9fkFqoeZByyoSA/vkitWGyxU/vToTekh8tFk hPtkXiBO4lw9VWidpSC/8jxIsWTI0uQBaiTyG9NISNW8OqyJDlUaUwWk1zxd9Tggr4x1QM bhixOXKNl9vmKHPZxCPK3wAZ30I6Je0= X-MC-Unique: HhoJ0YNqPz-vLk0-G1DkkA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 09/24] modules: add ccid module annotations Date: Fri, 18 Jun 2021 06:53:38 +0200 Message-Id: <20210618045353.2510174-10-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- hw/usb/ccid-card-emulated.c | 1 + hw/usb/ccid-card-passthru.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 5c76bed77aa0..6c8c0355e099 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -612,6 +612,7 @@ static const TypeInfo emulated_card_info =3D { .instance_size =3D sizeof(EmulatedState), .class_init =3D emulated_class_initfn, }; +module_obj(TYPE_EMULATED_CCID); =20 static void ccid_card_emulated_register_types(void) { diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 7212d0d7fb5e..fa3040fb7154 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -414,6 +414,7 @@ static const TypeInfo passthru_card_info =3D { .instance_size =3D sizeof(PassthruState), .class_init =3D passthru_class_initfn, }; +module_obj(TYPE_CCID_PASSTHRU); =20 static void ccid_card_passthru_register_types(void) { --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992710996703.2670378862616; Thu, 17 Jun 2021 22:05:10 -0700 (PDT) Received: from localhost ([::1]:43088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6gn-0004MR-TY for importer@patchew.org; Fri, 18 Jun 2021 01:05:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XD-0005In-4h for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XA-0004Az-Pl for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:14 -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-182-kAr5gjwTMvy_gE4jxQm9Rw-1; Fri, 18 Jun 2021 00:55:10 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44BE41922964; Fri, 18 Jun 2021 04:55:09 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0614860917; Fri, 18 Jun 2021 04:54:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8A30E1803544; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992112; 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=GMG26To2HhIsReHw8mY+AHfK8bISyekAm9NisM1uWFU=; b=g1A6p1hdA8aF1c5hrOZpd1TYL2QYw8DMADQ7+jY1OUA7sYfPHlAQTENE5pRtkDModI1R5v CoB8EVp7BtcqP8FD7Wu1QTh3b5jl/Wc7gPfrNsziLrzJHrKxiK6NAkFcvS73zFMt63H1ZI ie+i0orK+agjKUH8s+RaY1+NgsEkVjI= X-MC-Unique: kAr5gjwTMvy_gE4jxQm9Rw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 10/24] modules: add ui module annotations Date: Fri, 18 Jun 2021 06:53:39 +0200 Message-Id: <20210618045353.2510174-11-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- ui/egl-headless.c | 4 ++++ ui/gtk.c | 4 ++++ ui/sdl2.c | 4 ++++ ui/spice-app.c | 3 +++ ui/spice-core.c | 5 +++++ 5 files changed, 20 insertions(+) diff --git a/ui/egl-headless.c b/ui/egl-headless.c index da377a74af69..75404e0e8700 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -213,3 +213,7 @@ static void register_egl(void) } =20 type_init(register_egl); + +#ifdef CONFIG_OPENGL +module_dep("ui-opengl"); +#endif diff --git a/ui/gtk.c b/ui/gtk.c index 98046f577b9d..376b4d528daa 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2333,3 +2333,7 @@ static void register_gtk(void) } =20 type_init(register_gtk); + +#ifdef CONFIG_OPENGL +module_dep("ui-opengl"); +#endif diff --git a/ui/sdl2.c b/ui/sdl2.c index a203cb0239e1..36d9010cb6c1 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -918,3 +918,7 @@ static void register_sdl1(void) } =20 type_init(register_sdl1); + +#ifdef CONFIG_OPENGL +module_dep("ui-opengl"); +#endif diff --git a/ui/spice-app.c b/ui/spice-app.c index 4325ac2d9c54..641f4a9d53e3 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -221,3 +221,6 @@ static void register_spice_app(void) } =20 type_init(register_spice_app); + +module_dep("ui-spice-core"); +module_dep("chardev-spice"); diff --git a/ui/spice-core.c b/ui/spice-core.c index 272d19b0c152..86d43783acac 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -1037,3 +1037,8 @@ static void spice_register_config(void) qemu_add_opts(&qemu_spice_opts); } opts_init(spice_register_config); +module_opts("spice"); + +#ifdef CONFIG_OPENGL +module_dep("ui-opengl"); +#endif --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992731806248.5735814635334; Thu, 17 Jun 2021 22:05:31 -0700 (PDT) Received: from localhost ([::1]:43556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6h8-0004fB-Q3 for importer@patchew.org; Fri, 18 Jun 2021 01:05:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XB-0005Ej-Qd for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XA-0004AX-9R for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:13 -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-599-XJxZgp6iMmuVJu55BSLhBQ-1; Fri, 18 Jun 2021 00:55:10 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9631802575; Fri, 18 Jun 2021 04:55:08 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 044C29936; Fri, 18 Jun 2021 04:54:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 95B4F1803545; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992111; 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=Sj1Po7tVmKlopcgqBw4EOoHUga5mbhDkJwIGENn43Lo=; b=WnQtzKfqjfdprXT8Lb57uwcpysLkVaqP2lJTgwqax0aAkmZjJaA8Or/6i6f8xN9cJlFMbt +FdZvcEgD9t0uOaqgtnrz9dT9adtHLsYtgCmzP3XJByj5Q5bTqmTubrfWJeY+uOxfuVeNJ 4y1SqTwHCPLZgAiueeTNhu8biEHJbp4= X-MC-Unique: XJxZgp6iMmuVJu55BSLhBQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 11/24] modules: add s390x module annotations Date: Fri, 18 Jun 2021 06:53:40 +0200 Message-Id: <20210618045353.2510174-12-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- hw/s390x/virtio-ccw-gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index 75a9e4bb3908..5868a2a07093 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -59,6 +59,7 @@ static const TypeInfo virtio_ccw_gpu =3D { .instance_init =3D virtio_ccw_gpu_instance_init, .class_init =3D virtio_ccw_gpu_class_init, }; +module_obj(TYPE_VIRTIO_GPU_CCW); =20 static void virtio_ccw_gpu_register(void) { @@ -68,3 +69,5 @@ static void virtio_ccw_gpu_register(void) } =20 type_init(virtio_ccw_gpu_register) + +module_arch("s390x"); --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992836237915.2889845432851; Thu, 17 Jun 2021 22:07:16 -0700 (PDT) Received: from localhost ([::1]:48992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6ip-0008Lg-8G for importer@patchew.org; Fri, 18 Jun 2021 01:07:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XV-0005Sf-AF for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XP-0004MR-6R for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:33 -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-494-obpev5N2Ptm-uHQ4wDZfuQ-1; Fri, 18 Jun 2021 00:55:25 -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 EBBF61922960; Fri, 18 Jun 2021 04:55:23 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E4BE5D6AC; Fri, 18 Jun 2021 04:55:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A07B21803546; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992126; 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=Bil6m6lPZf8+EkEMYi7OXN5QFOi3mSyraEjZidNLU2A=; b=Amf4UX7OudU7NnzjdIWCxeI0xrlDH2Oxep8QaIff4XcciJr4vnzC7Ted8h63hyVm4/rykb jJCrE8zcSD7rU6Z9HyGjjOgvT/wkWuodWJnyxWAx8t189Z97JSAv4es+cVMAGYdrFHvAkS WM+p/hM+NodReUfpllxz96EUn+AykzQ= X-MC-Unique: obpev5N2Ptm-uHQ4wDZfuQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 12/24] modules: add block module annotations Date: Fri, 18 Jun 2021 06:53:41 +0200 Message-Id: <20210618045353.2510174-13-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- block/iscsi-opts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/iscsi-opts.c b/block/iscsi-opts.c index afaf8837d6c1..4f2da405e645 100644 --- a/block/iscsi-opts.c +++ b/block/iscsi-opts.c @@ -68,3 +68,4 @@ static void iscsi_block_opts_init(void) } =20 block_init(iscsi_block_opts_init); +module_opts("iscsi"); --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992833012373.6539920312307; Thu, 17 Jun 2021 22:07:13 -0700 (PDT) Received: from localhost ([::1]:48778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6il-0008Cp-MW for importer@patchew.org; Fri, 18 Jun 2021 01:07:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XX-0005Up-72 for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XS-0004Py-LR for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:34 -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-394-htnwATD3NkGR_duJMazxDg-1; Fri, 18 Jun 2021 00:55:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 64C881922964; Fri, 18 Jun 2021 04:55:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB0EE1001B2C; Fri, 18 Jun 2021 04:55:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AB6E71803547; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992130; 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=xH0dp4DcfpAQE2IObwwnlokSnePzDh3PxGejKR+OKCg=; b=X0eOUMMeKoTpY6Mn9kubXfNQL/YWzd8OCUjQMzW+PCUm2JHYOKPmPxKWVjmfQgv7DLEY/b Rn9I+6tMWzTfEUlDVtnTROl1GGnBYZO4vkQ+wj3eeVjxK5dSIUGUiIzSdhLTJtkz6B9T/B 9cj1KaXuF4r4NG1Jk/lBfxcKHAuaH4c= X-MC-Unique: htnwATD3NkGR_duJMazxDg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 13/24] modules: use modinfo for dependencies Date: Fri, 18 Jun 2021 06:53:42 +0200 Message-Id: <20210618045353.2510174-14-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Use module database for module dependencies. Drop hard-coded dependency list. Signed-off-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- util/module.c | 55 ++++++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/util/module.c b/util/module.c index 8d3e8275b9f7..7d7b69cbdaca 100644 --- a/util/module.c +++ b/util/module.c @@ -182,28 +182,6 @@ static int module_load_file(const char *fname, bool ma= yfail, bool export_symbols out: return ret; } - -static const struct { - const char *name; - const char *dep; -} module_deps[] =3D { - { "audio-spice", "ui-spice-core" }, - { "chardev-spice", "ui-spice-core" }, - { "hw-display-qxl", "ui-spice-core" }, - { "ui-spice-app", "ui-spice-core" }, - { "ui-spice-app", "chardev-spice" }, - - { "hw-display-virtio-gpu-gl", "hw-display-virtio-gpu" }, - { "hw-display-virtio-gpu-pci-gl", "hw-display-virtio-gpu-pci" }, - { "hw-display-virtio-vga-gl", "hw-display-virtio-vga" }, - -#ifdef CONFIG_OPENGL - { "ui-egl-headless", "ui-opengl" }, - { "ui-gtk", "ui-opengl" }, - { "ui-sdl", "ui-opengl" }, - { "ui-spice-core", "ui-opengl" }, -#endif -}; #endif =20 bool module_load_one(const char *prefix, const char *lib_name, bool mayfai= l) @@ -219,9 +197,11 @@ bool module_load_one(const char *prefix, const char *l= ib_name, bool mayfail) char *dirs[5]; char *module_name; int i =3D 0, n_dirs =3D 0; - int ret, dep; + int ret; bool export_symbols =3D false; static GHashTable *loaded_modules; + const QemuModinfo *modinfo; + const char **sl; =20 if (!g_module_supported()) { fprintf(stderr, "Module is not supported by system.\n"); @@ -234,23 +214,30 @@ bool module_load_one(const char *prefix, const char *= lib_name, bool mayfail) =20 module_name =3D g_strdup_printf("%s%s", prefix, lib_name); =20 - for (dep =3D 0; dep < ARRAY_SIZE(module_deps); dep++) { - if (strcmp(module_name, module_deps[dep].name) =3D=3D 0) { - /* we depend on another module */ - module_load_one("", module_deps[dep].dep, false); - } - if (strcmp(module_name, module_deps[dep].dep) =3D=3D 0) { - /* another module depends on us */ - export_symbols =3D true; - } - } - if (g_hash_table_contains(loaded_modules, module_name)) { g_free(module_name); return true; } g_hash_table_add(loaded_modules, module_name); =20 + for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { + if (modinfo->deps) { + if (strcmp(modinfo->name, module_name) =3D=3D 0) { + /* we depend on other module(s) */ + for (sl =3D modinfo->deps; *sl !=3D NULL; sl++) { + module_load_one("", *sl, false); + } + } else { + for (sl =3D modinfo->deps; *sl !=3D NULL; sl++) { + if (strcmp(module_name, *sl) =3D=3D 0) { + /* another module depends on us */ + export_symbols =3D true; + } + } + } + } + } + search_dir =3D getenv("QEMU_MODULE_DIR"); if (search_dir !=3D NULL) { dirs[n_dirs++] =3D g_strdup_printf("%s", search_dir); --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992922272345.6933356129043; Thu, 17 Jun 2021 22:08:42 -0700 (PDT) Received: from localhost ([::1]:53290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6kC-0002mc-Tb for importer@patchew.org; Fri, 18 Jun 2021 01:08:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XV-0005Se-7u for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6XR-0004OU-PQ for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:33 -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-21-GndOKKGuNMyFpmEluhiMJw-1; Fri, 18 Jun 2021 00:55:27 -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 00A81818412; Fri, 18 Jun 2021 04:55:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C4795D6AC; Fri, 18 Jun 2021 04:55:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B67CA1803548; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992129; 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=O2xcXu7/WxZd+2SLYEP4NHfXOgGjpI8y92uLWdyo4TM=; b=Z4YT7BmA2ykroaMaW6X2hiyKEUx1KI3Szn6O3pRor/jnUfHeCkz2JesKo4M1WSXiNXm8UU jJvveqQRM+o5DApXPVQeToZ3M9KuQIHmuKfe/bLLIBzANqf/QSxgOd/ZZupdrAQ2SgNgkg zgC8zZ7rW4jcNOtlMt18pcvCGDc/HZU= X-MC-Unique: GndOKKGuNMyFpmEluhiMJw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 14/24] modules: use modinfo for qom load Date: Fri, 18 Jun 2021 06:53:43 +0200 Message-Id: <20210618045353.2510174-15-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Use module database to figure which module implements a given QOM type. Drop hard-coded object list. Signed-off-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- util/module.c | 77 ++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 53 deletions(-) diff --git a/util/module.c b/util/module.c index 7d7b69cbdaca..745ae0fb20ed 100644 --- a/util/module.c +++ b/util/module.c @@ -280,80 +280,51 @@ bool module_load_one(const char *prefix, const char *= lib_name, bool mayfail) return success; } =20 -/* - * Building devices and other qom objects modular is mostly useful in - * case they have dependencies to external shared libraries, so we can - * cut down the core qemu library dependencies. Which is the case for - * only a very few devices & objects. - * - * So with the expectation that this will be rather the exception than - * the rule and the list will not gain that many entries, go with a - * simple manually maintained list for now. - * - * The list must be sorted by module (module_load_qom_all() needs this). - */ -static struct { - const char *type; - const char *prefix; - const char *module; -} const qom_modules[] =3D { - { "ccid-card-passthru", "hw-", "usb-smartcard" }, - { "ccid-card-emulated", "hw-", "usb-smartcard" }, - { "usb-redir", "hw-", "usb-redirect" }, - { "qxl-vga", "hw-", "display-qxl" }, - { "qxl", "hw-", "display-qxl" }, - { "virtio-gpu-device", "hw-", "display-virtio-gpu" }, - { "virtio-gpu-gl-device", "hw-", "display-virtio-gpu-gl" }, - { "vhost-user-gpu", "hw-", "display-virtio-gpu" }, - { "virtio-gpu-pci-base", "hw-", "display-virtio-gpu-pci" }, - { "virtio-gpu-pci", "hw-", "display-virtio-gpu-pci" }, - { "virtio-gpu-gl-pci", "hw-", "display-virtio-gpu-pci-gl" }, - { "vhost-user-gpu-pci", "hw-", "display-virtio-gpu-pci" }, - { "virtio-gpu-ccw", "hw-", "s390x-virtio-gpu-ccw" }, - { "virtio-vga-base", "hw-", "display-virtio-vga" }, - { "virtio-vga", "hw-", "display-virtio-vga" }, - { "virtio-vga-gl", "hw-", "display-virtio-vga-gl" }, - { "vhost-user-vga", "hw-", "display-virtio-vga" }, - { "chardev-braille", "chardev-", "baum" }, - { "chardev-spicevmc", "chardev-", "spice" }, - { "chardev-spiceport", "chardev-", "spice" }, -}; +#ifdef CONFIG_MODULES =20 static bool module_loaded_qom_all; =20 void module_load_qom_one(const char *type) { - int i; + const QemuModinfo *modinfo; + const char **sl; =20 if (!type) { return; } - for (i =3D 0; i < ARRAY_SIZE(qom_modules); i++) { - if (strcmp(qom_modules[i].type, type) =3D=3D 0) { - module_load_one(qom_modules[i].prefix, - qom_modules[i].module, - false); - return; + + for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { + if (!modinfo->objs) { + continue; + } + for (sl =3D modinfo->objs; *sl !=3D NULL; sl++) { + if (strcmp(type, *sl) =3D=3D 0) { + module_load_one("", modinfo->name, false); + } } } } =20 void module_load_qom_all(void) { - int i; + const QemuModinfo *modinfo; =20 if (module_loaded_qom_all) { return; } - for (i =3D 0; i < ARRAY_SIZE(qom_modules); i++) { - if (i > 0 && (strcmp(qom_modules[i - 1].module, - qom_modules[i].module) =3D=3D 0 && - strcmp(qom_modules[i - 1].prefix, - qom_modules[i].prefix) =3D=3D 0)) { - /* one module implementing multiple types -> load only once */ + + for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { + if (!modinfo->objs) { continue; } - module_load_one(qom_modules[i].prefix, qom_modules[i].module, true= ); + module_load_one("", modinfo->name, false); } module_loaded_qom_all =3D true; } + +#else + +void module_load_qom_one(const char *type) {} +void module_load_qom_all(void) {} + +#endif --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992932039155.3233535036751; Thu, 17 Jun 2021 22:08:52 -0700 (PDT) Received: from localhost ([::1]:53830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6kN-00038P-0v for importer@patchew.org; Fri, 18 Jun 2021 01:08:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xh-0005Zs-3d for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xf-0004Yo-If for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:44 -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-518-jw52EjvOOUaZV-wKPT3D9A-1; Fri, 18 Jun 2021 00:55:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7ECA5802575; Fri, 18 Jun 2021 04:55:38 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C65985D9CC; Fri, 18 Jun 2021 04:55:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C55461803549; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992143; 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=XLx3/j/xE0p8BLnxDaBxHeaYVuYg+U7FzwuVjHhHLY8=; b=Gas6Ja2BdWwDKHfsCs6UQtgz/0y6v4nyjo4iCNau61WEiUPfbnXEzmbvaMOFortShWvdEE ZArxSTTgg+1Lb7P9H4y3DzH+ioCfxbNRR5lGQMeWmoO3NBLuOfAg33Zl/aULE40KRwvfrx s0XhApA/TESiH9ywBIW2fE1g3n5bm2s= X-MC-Unique: jw52EjvOOUaZV-wKPT3D9A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 15/24] modules: use modinfo for qemu opts load Date: Fri, 18 Jun 2021 06:53:44 +0200 Message-Id: <20210618045353.2510174-16-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Use module database to figure which module adds given QemuOpts group. Signed-off-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- softmmu/vl.c | 17 ----------------- stubs/module-opts.c | 4 ---- util/module.c | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index a4857ec43ff3..c91d63e3cc02 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2675,23 +2675,6 @@ void qmp_x_exit_preconfig(Error **errp) } } =20 -#ifdef CONFIG_MODULES -void qemu_load_module_for_opts(const char *group) -{ - static bool spice_tried; - if (g_str_equal(group, "spice") && !spice_tried) { - ui_module_load_one("spice-core"); - spice_tried =3D true; - } - - static bool iscsi_tried; - if (g_str_equal(group, "iscsi") && !iscsi_tried) { - block_module_load_one("iscsi"); - iscsi_tried =3D true; - } -} -#endif - void qemu_init(int argc, char **argv, char **envp) { QemuOpts *opts; diff --git a/stubs/module-opts.c b/stubs/module-opts.c index a7d0e4ad6ead..5412429ea869 100644 --- a/stubs/module-opts.c +++ b/stubs/module-opts.c @@ -1,6 +1,2 @@ #include "qemu/osdep.h" #include "qemu/config-file.h" - -void qemu_load_module_for_opts(const char *group) -{ -} diff --git a/util/module.c b/util/module.c index 745ae0fb20ed..a9ec2da9972e 100644 --- a/util/module.c +++ b/util/module.c @@ -20,6 +20,7 @@ #include "qemu/queue.h" #include "qemu/module.h" #include "qemu/cutils.h" +#include "qemu/config-file.h" #ifdef CONFIG_MODULE_UPGRADES #include "qemu-version.h" #endif @@ -322,8 +323,26 @@ void module_load_qom_all(void) module_loaded_qom_all =3D true; } =20 +void qemu_load_module_for_opts(const char *group) +{ + const QemuModinfo *modinfo; + const char **sl; + + for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { + if (!modinfo->opts) { + continue; + } + for (sl =3D modinfo->opts; *sl !=3D NULL; sl++) { + if (strcmp(group, *sl) =3D=3D 0) { + module_load_one("", modinfo->name, false); + } + } + } +} + #else =20 +void qemu_load_module_for_opts(const char *group) {} void module_load_qom_one(const char *type) {} void module_load_qom_all(void) {} =20 --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623993010549875.870551464112; Thu, 17 Jun 2021 22:10:10 -0700 (PDT) Received: from localhost ([::1]:57490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6ld-0005cS-Es for importer@patchew.org; Fri, 18 Jun 2021 01:10:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xm-0005d2-Eb for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xg-0004ZF-1o for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:49 -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-358-a-Ibd4JqOpqJB7hd2nNX5w-1; Fri, 18 Jun 2021 00:55:42 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3521818401; Fri, 18 Jun 2021 04:55:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 616EC1A866; Fri, 18 Jun 2021 04:55:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D17BF180354A; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992143; 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=l9uYxKFrK9WwU8Bk0tBUhZzNgciCZbCanX+mTsGMzPg=; b=O8TjAVwC9W+Di1QAAkPQ/PU/OTtuCaERvYPctAv5qCEmDw8ObtmdJ4Fa+hu5VAg1DyCaMa d1vER14QeTEg43j8AbrH6uNGVHCj7srsnzoqUYN+q/ywC2l6/BetZ1hnzqK66bqEA8EjYj VQcMnG7mX+TfDgTY2wU81eYVjz/wobs= X-MC-Unique: a-Ibd4JqOpqJB7hd2nNX5w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 16/24] modules: add tracepoints Date: Fri, 18 Jun 2021 06:53:45 +0200 Message-Id: <20210618045353.2510174-17-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" One for module load and one for qom type lookup. Signed-off-by: Gerd Hoffmann --- util/module.c | 3 +++ util/trace-events | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/util/module.c b/util/module.c index a9ec2da9972e..acaaecad56c9 100644 --- a/util/module.c +++ b/util/module.c @@ -24,6 +24,7 @@ #ifdef CONFIG_MODULE_UPGRADES #include "qemu-version.h" #endif +#include "trace.h" =20 typedef struct ModuleEntry { @@ -176,6 +177,7 @@ static int module_load_file(const char *fname, bool may= fail, bool export_symbols ret =3D 0; } =20 + trace_module_load_module(fname); QTAILQ_FOREACH_SAFE(e, &dso_init_list, node, next) { QTAILQ_REMOVE(&dso_init_list, e, node); g_free(e); @@ -294,6 +296,7 @@ void module_load_qom_one(const char *type) return; } =20 + trace_module_lookup_object_type(type); for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { if (!modinfo->objs) { continue; diff --git a/util/trace-events b/util/trace-events index 806cac14a762..c8f53d7d9fc3 100644 --- a/util/trace-events +++ b/util/trace-events @@ -100,3 +100,7 @@ uffd_create_fd_api_failed(int err) "errno: %i" uffd_create_fd_api_noioctl(uint64_t ioctl_req, uint64_t ioctl_supp) "ioctl= _req: 0x%" PRIx64 "ioctl_supp: 0x%" PRIx64 uffd_register_memory_failed(void *addr, uint64_t length, uint64_t mode, in= t err) "addr: %p length: %" PRIu64 " mode: 0x%" PRIx64 " errno: %i" uffd_unregister_memory_failed(void *addr, uint64_t length, int err) "addr:= %p length: %" PRIu64 " errno: %i" + +# module.c +module_load_module(const char *name) "file %s" +module_lookup_object_type(const char *name) "name %s" --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162399252262291.96204051689165; Thu, 17 Jun 2021 22:02:02 -0700 (PDT) Received: from localhost ([::1]:58638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6dl-0004Nq-JG for importer@patchew.org; Fri, 18 Jun 2021 01:02:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xx-0005pv-GP for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xv-0004kf-Sd for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:01 -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-268-XEzIUyAMOlKvhTiFtpMbJw-1; Fri, 18 Jun 2021 00:55:57 -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 569011922962; Fri, 18 Jun 2021 04:55:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0EC1D5D6AC; Fri, 18 Jun 2021 04:55:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E05B7180354B; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992159; 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=ZqVKUlIoVYGJDWHLbcnA/DeXxdnLiyl9DUE51hYG/0c=; b=Po7K2TlQmK9VF8UCfkefI+YyeFlxEX6CM66Z0zVVoylEvHBFASwHokEUC+o8fin4ExVWzP VAxyI0JCR/SUyfoxfxY0yap79afa0k6RDOG03YYNBmCZEZ2vvpPb/12OCvO9/DfWnY+Mb0 RGoSbj54TrE5hGQrqSQI5p83xSaT4WQ= X-MC-Unique: XEzIUyAMOlKvhTiFtpMbJw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 17/24] modules: check arch and block load on mismatch Date: Fri, 18 Jun 2021 06:53:46 +0200 Message-Id: <20210618045353.2510174-18-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add module_allow_arch() to set the target architecture. In case a module is limited to some arch verify arches match and ignore the module if not. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 1 + softmmu/vl.c | 3 +++ util/module.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index a98748d501d3..7f4b1af8198c 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -72,6 +72,7 @@ void module_call_init(module_init_type type); bool module_load_one(const char *prefix, const char *lib_name, bool mayfai= l); void module_load_qom_one(const char *type); void module_load_qom_all(void); +void module_allow_arch(const char *arch); =20 /* * module info annotation macros diff --git a/softmmu/vl.c b/softmmu/vl.c index c91d63e3cc02..866ea310a411 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -126,6 +126,8 @@ #include "sysemu/iothread.h" #include "qemu/guest-random.h" =20 +#include "config-host.h" + #define MAX_VIRTIO_CONSOLES 1 =20 typedef struct BlockdevOptionsQueueEntry { @@ -2725,6 +2727,7 @@ void qemu_init(int argc, char **argv, char **envp) =20 #ifdef CONFIG_MODULES module_init_info(qemu_modinfo); + module_allow_arch(TARGET_NAME); #endif =20 qemu_init_subsystems(); diff --git a/util/module.c b/util/module.c index acaaecad56c9..065aed09ffef 100644 --- a/util/module.c +++ b/util/module.c @@ -117,12 +117,33 @@ static const QemuModinfo module_info_stub[] =3D { { /* end of list */ } }; static const QemuModinfo *module_info =3D module_info_stub; +static const char *module_arch; =20 void module_init_info(const QemuModinfo *info) { module_info =3D info; } =20 +void module_allow_arch(const char *arch) +{ + module_arch =3D arch; +} + +static bool module_check_arch(const QemuModinfo *modinfo) +{ + if (modinfo->arch) { + if (!module_arch) { + /* no arch set -> ignore all */ + return false; + } + if (strcmp(module_arch, modinfo->arch) !=3D 0) { + /* mismatch */ + return false; + } + } + return true; +} + static int module_load_file(const char *fname, bool mayfail, bool export_s= ymbols) { GModule *g_module; @@ -224,6 +245,13 @@ bool module_load_one(const char *prefix, const char *l= ib_name, bool mayfail) g_hash_table_add(loaded_modules, module_name); =20 for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { + if (modinfo->arch) { + if (strcmp(modinfo->name, module_name) =3D=3D 0) { + if (!module_check_arch(modinfo)) { + return false; + } + } + } if (modinfo->deps) { if (strcmp(modinfo->name, module_name) =3D=3D 0) { /* we depend on other module(s) */ @@ -345,6 +373,7 @@ void qemu_load_module_for_opts(const char *group) =20 #else =20 +void module_allow_arch(const char *arch) {} void qemu_load_module_for_opts(const char *group) {} void module_load_qom_one(const char *type) {} void module_load_qom_all(void) {} --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992280003196.91003374218963; Thu, 17 Jun 2021 21:58:00 -0700 (PDT) Received: from localhost ([::1]:43674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6Zq-0002oJ-OU for importer@patchew.org; Fri, 18 Jun 2021 00:57:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xs-0005lq-LP for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xp-0004fW-Pk for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:55:56 -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-219-hIS1yb-XNGCcaEDpZ41gyw-1; Fri, 18 Jun 2021 00:55:52 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6C61036258; Fri, 18 Jun 2021 04:55:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D46460CC9; Fri, 18 Jun 2021 04:55:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EABB9180354C; Fri, 18 Jun 2021 06:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992153; 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=BAhOEkRB+XqNxdKSCxIqwsE6YM+rfzIJzAUNzwPs19M=; b=VIBwjk5YEWH1mzB5mJjRZ37+PjS3muUgpyXmVDtIl1S8bhB4zRgGhZuc1NHakdpR8WItFr h7LVogeR1dm49vcuZx0ard9G1IyamL/UEb9DblKwNWPHnQZqzI9OAQq0zYlabZsSVOzt+L 5wKye9prPZDoUj+sE2ULnXPJlEEpquA= X-MC-Unique: hIS1yb-XNGCcaEDpZ41gyw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 18/24] modules: check arch on qom lookup Date: Fri, 18 Jun 2021 06:53:47 +0200 Message-Id: <20210618045353.2510174-19-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" With target-specific modules we can have multiple modules implementing the same object. Therefore we have to check the target arch on lookup to find the correct module. Signed-off-by: Gerd Hoffmann --- util/module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/module.c b/util/module.c index 065aed09ffef..6bb4ad915a1c 100644 --- a/util/module.c +++ b/util/module.c @@ -329,6 +329,9 @@ void module_load_qom_one(const char *type) if (!modinfo->objs) { continue; } + if (!module_check_arch(modinfo)) { + continue; + } for (sl =3D modinfo->objs; *sl !=3D NULL; sl++) { if (strcmp(type, *sl) =3D=3D 0) { module_load_one("", modinfo->name, false); @@ -349,6 +352,9 @@ void module_load_qom_all(void) if (!modinfo->objs) { continue; } + if (!module_check_arch(modinfo)) { + continue; + } module_load_one("", modinfo->name, false); } module_loaded_qom_all =3D true; --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992405330941.7171910034759; Thu, 17 Jun 2021 22:00:05 -0700 (PDT) Received: from localhost ([::1]:52988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6bs-0000Z4-8u for importer@patchew.org; Fri, 18 Jun 2021 01:00:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Y6-0006ES-Ar for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Y4-0004qO-G7 for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:10 -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-480-79InszIzOEOTOS4Dr8YH_A-1; Fri, 18 Jun 2021 00:56:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E863100C610; Fri, 18 Jun 2021 04:56:05 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F10B59936; Fri, 18 Jun 2021 04:55:51 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 01541180354D; Fri, 18 Jun 2021 06:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992167; 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=fugnZbIjCEgX+S0VovxzoXROXtx3xv3EaaA2wSMMa3o=; b=BumcQHmy5gsuZo1P9pECnbqi9nqIvAr3qzh4Ij5ZodLiFKikzXByA3mQSoGrzsPxSVZugS PKWpCfGBpyYHgSFoSabV4Ce9RR2r82iyy1+ZGTyiOxW7ebeYjFZ1i8H9prCVuGcgwg3sHO rKuyWwCv0vLpZafXV9Uc1BeyYFBJg80= X-MC-Unique: 79InszIzOEOTOS4Dr8YH_A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 19/24] modules: target-specific module build infrastructure Date: Fri, 18 Jun 2021 06:53:48 +0200 Message-Id: <20210618045353.2510174-20-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- meson.build | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/meson.build b/meson.build index 9cf50a50d39a..e822477a231a 100644 --- a/meson.build +++ b/meson.build @@ -1781,6 +1781,7 @@ user_ss =3D ss.source_set() util_ss =3D ss.source_set() =20 modules =3D {} +target_modules =3D {} hw_arch =3D {} target_arch =3D {} target_softmmu_arch =3D {} @@ -2055,6 +2056,41 @@ foreach d, list : modules endforeach endforeach =20 +foreach d, list : target_modules + foreach m, module_ss : list + if enable_modules and targetos !=3D 'windows' + foreach target : target_dirs + if target.endswith('-softmmu') + config_target =3D config_target_mak[target] + config_target +=3D config_host + target_inc =3D [include_directories('target' / config_target['TA= RGET_BASE_ARCH'])] + c_args =3D ['-DNEED_CPU_H', + '-DCONFIG_TARGET=3D"@0@-config-target.h"'.format(targe= t), + '-DCONFIG_DEVICES=3D"@0@-config-devices.h"'.format(tar= get)] + target_module_ss =3D module_ss.apply(config_target, strict: fals= e) + if target_module_ss.sources() !=3D [] + module_name =3D d + '-' + m + '-' + config_target['TARGET_NAME= '] + sl =3D static_library(module_name, + [genh, target_module_ss.sources()], + dependencies: [modulecommon, target_module= _ss.dependencies()], + include_directories: target_inc, + c_args: c_args, + pic: true) + softmmu_mods +=3D sl + modinfo_files +=3D custom_target(module_name + '.modinfo', + output: module_name + '.modinfo= ', + input: target_module_ss.sources= (), + capture: true, + command: [modinfo_collect, '--t= arget', target, '@INPUT@']) + endif + endif + endforeach + else + specific_ss.add_all(module_ss) + endif + endforeach +endforeach + if enable_modules modinfo_src =3D custom_target('modinfo.c', output: 'modinfo.c', --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623993039703332.05688663526325; Thu, 17 Jun 2021 22:10:39 -0700 (PDT) Received: from localhost ([::1]:58016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6m6-0005y1-KV for importer@patchew.org; Fri, 18 Jun 2021 01:10:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Y2-0005zx-1Y for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Xx-0004lQ-Gq for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:05 -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-222-Qr8_0sPMNfWose8LDAo8pg-1; Fri, 18 Jun 2021 00:55:59 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25D0F3625B; Fri, 18 Jun 2021 04:55:58 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D838560E3A; Fri, 18 Jun 2021 04:55:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0DE3C180354E; Fri, 18 Jun 2021 06:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992160; 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=MOj1tDTsNrMLeU1D5eiY7ntP624q1LCrH82mgp0Qpto=; b=ACEyqNWG5juurDPNVEtkStSlwAVo7Fasw5gaOL8ZWWPEMTN1r72k2g0YIOW4kenMR4Er3C 2N+KzMFDsQyj1tYHQzsWfGmih/LLVbqhjjORAL9D3gspSf53Uu3g5T0+lUdrEijUDzcDh/ MtIiRIywKXg/lL3tozaa5x5mHNawwc0= X-MC-Unique: Qr8_0sPMNfWose8LDAo8pg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 20/24] accel: autoload modules Date: Fri, 18 Jun 2021 06:53:49 +0200 Message-Id: <20210618045353.2510174-21-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Call module_object_class_by_name() instead of object_class_by_name() for objects possibly implemented as module Signed-off-by: Gerd Hoffmann --- accel/accel-common.c | 2 +- accel/accel-softmmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/accel-common.c b/accel/accel-common.c index cf07f78421d6..7b8ec7e0f72a 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -44,7 +44,7 @@ static const TypeInfo accel_type =3D { AccelClass *accel_find(const char *opt_name) { char *class_name =3D g_strdup_printf(ACCEL_CLASS_NAME("%s"), opt_name); - AccelClass *ac =3D ACCEL_CLASS(object_class_by_name(class_name)); + AccelClass *ac =3D ACCEL_CLASS(module_object_class_by_name(class_name)= ); g_free(class_name); return ac; } diff --git a/accel/accel-softmmu.c b/accel/accel-softmmu.c index 50fa5acaa401..67276e4f5222 100644 --- a/accel/accel-softmmu.c +++ b/accel/accel-softmmu.c @@ -72,7 +72,7 @@ void accel_init_ops_interfaces(AccelClass *ac) g_assert(ac_name !=3D NULL); =20 ops_name =3D g_strdup_printf("%s" ACCEL_OPS_SUFFIX, ac_name); - ops =3D ACCEL_OPS_CLASS(object_class_by_name(ops_name)); + ops =3D ACCEL_OPS_CLASS(module_object_class_by_name(ops_name)); g_free(ops_name); =20 /* --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623993154941429.4690012940313; Thu, 17 Jun 2021 22:12:34 -0700 (PDT) Received: from localhost ([::1]:33936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6nx-0000Vh-Kr for importer@patchew.org; Fri, 18 Jun 2021 01:12:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YF-0006jv-2D for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YB-0004xT-VL for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:18 -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-524-SVADxBykPxOftQFGTEM8KA-1; Fri, 18 Jun 2021 00:56:14 -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 C471010C1ADC; Fri, 18 Jun 2021 04:56:12 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 864195D6AC; Fri, 18 Jun 2021 04:55:59 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 187CD180354F; Fri, 18 Jun 2021 06:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992175; 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=x2Na7nuQwlpXv3laK5ONyMsKbyRncyxXdx8y9K78YrM=; b=cZ3d80ud044RLkRfo8XQlslAluuqBCcEu15ww6s4wGqWGsQpOoAqDaaXGf0FNemkMPUcb5 se4G+fzAilJl05haSF4yTtsFOt34vN99qfLLDHCHvpHvLdNQ3rBKxVTn2wUcTyJ1LdnWgE 3kLZqSBP1x8I8Bgnhpje41iRONh3FHc= X-MC-Unique: SVADxBykPxOftQFGTEM8KA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 21/24] accel: add qtest module annotations Date: Fri, 18 Jun 2021 06:53:50 +0200 Message-Id: <20210618045353.2510174-22-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add module annotations for qtest so autoloading works. Signed-off-by: Gerd Hoffmann --- accel/qtest/qtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index edb29f6fa4c0..7e6b8110d52b 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -45,6 +45,7 @@ static const TypeInfo qtest_accel_type =3D { .parent =3D TYPE_ACCEL, .class_init =3D qtest_accel_class_init, }; +module_obj(TYPE_QTEST_ACCEL); =20 static void qtest_accel_ops_class_init(ObjectClass *oc, void *data) { @@ -61,6 +62,7 @@ static const TypeInfo qtest_accel_ops_type =3D { .class_init =3D qtest_accel_ops_class_init, .abstract =3D true, }; +module_obj(ACCEL_OPS_NAME("qtest")); =20 static void qtest_type_init(void) { --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992584274285.6141593829884; Thu, 17 Jun 2021 22:03:04 -0700 (PDT) Received: from localhost ([::1]:35030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6ek-0007SF-RH for importer@patchew.org; Fri, 18 Jun 2021 01:03:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YJ-00072F-MU for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YG-00054O-8Y for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:23 -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-22-C5INigWWNKGVZEjVvVqsyw-1; Fri, 18 Jun 2021 00:56:18 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02974818401; Fri, 18 Jun 2021 04:56:17 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E273060E3A; Fri, 18 Jun 2021 04:56:06 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 256BE1803550; Fri, 18 Jun 2021 06:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992179; 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=vDpDkSx1b3J6gR9ItdyzC5/KHLDeG5cQIVbLs9NVWFg=; b=JB/+opp6FEfivfEtKCpcCRb9i5A8u5SnrVVrRoJnyS6YVkr46SQ0IpfZmcmtPRPR0Uit8N 2qdOtrEfHMMQhGTTseAE0lAuJobWMSaKa+Zp9JaO+j5GuBknwZ2xE9A7gxrRryTCY7WGIL zjo/34J/Ca5nM4dmWE0tFE3CO074cXY= X-MC-Unique: C5INigWWNKGVZEjVvVqsyw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 22/24] accel: build qtest modular Date: Fri, 18 Jun 2021 06:53:51 +0200 Message-Id: <20210618045353.2510174-23-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Allow building accelerators as module. Start with qtest as first user. Signed-off-by: Gerd Hoffmann --- accel/qtest/meson.build | 8 ++------ meson.build | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/accel/qtest/meson.build b/accel/qtest/meson.build index a2f327645980..4c6560029336 100644 --- a/accel/qtest/meson.build +++ b/accel/qtest/meson.build @@ -1,6 +1,2 @@ -qtest_ss =3D ss.source_set() -qtest_ss.add(files( - 'qtest.c', -)) - -specific_ss.add_all(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], if_true: qte= st_ss) +qtest_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], + if_true: files('qtest.c')) diff --git a/meson.build b/meson.build index e822477a231a..8f55f563eefe 100644 --- a/meson.build +++ b/meson.build @@ -1780,6 +1780,9 @@ trace_ss =3D ss.source_set() user_ss =3D ss.source_set() util_ss =3D ss.source_set() =20 +# accel modules +qtest_module_ss =3D ss.source_set() + modules =3D {} target_modules =3D {} hw_arch =3D {} @@ -2018,6 +2021,9 @@ specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_tru= e: linux_user_ss) subdir('tests/qtest/libqos') subdir('tests/qtest/fuzz') =20 +# accel modules +target_modules +=3D { 'accel' : { 'qtest': qtest_module_ss }} + ######################## # Library dependencies # ######################## --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623993172897440.0862322505071; Thu, 17 Jun 2021 22:12:52 -0700 (PDT) Received: from localhost ([::1]:34478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6oF-0000t3-QI for importer@patchew.org; Fri, 18 Jun 2021 01:12:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YG-0006qf-PC for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YE-00052Z-TH for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:20 -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-175-2EoLhjtHOPCBE-P2fg8LQg-1; Fri, 18 Jun 2021 00:56:17 -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 380B5107ACF6; Fri, 18 Jun 2021 04:56:15 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 56D8F5D6AC; Fri, 18 Jun 2021 04:56:14 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 325021803551; Fri, 18 Jun 2021 06:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992178; 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=ohZemjbMdxXAdqZHX1YAeGajo0H+ii+GLhm/3Tma2H0=; b=eTPk3MEExRF/1+4Q7VEmIfOyIyMEorfvqX5fIIIqMmMdXH7gvwF7Z9JlgVlo2MZIid1qko LRbd/TDNV8GUhB1vdUuvgtg9Of2f7Qatq+i/FbNMtMvRLVwdBKCLiLthvhz5Pn/oSsXlRO 628eB0O7EZ7FtoVQhGwGYCzTS4i/F+M= X-MC-Unique: 2EoLhjtHOPCBE-P2fg8LQg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 23/24] accel: add tcg module annotations Date: Fri, 18 Jun 2021 06:53:52 +0200 Message-Id: <20210618045353.2510174-24-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@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=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add module annotations for tcg so autoloading works. Signed-off-by: Gerd Hoffmann --- accel/tcg/tcg-accel-ops.c | 1 + accel/tcg/tcg-all.c | 1 + 2 files changed, 2 insertions(+) diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 7191315aeed4..1a8e8390bd60 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -124,6 +124,7 @@ static const TypeInfo tcg_accel_ops_type =3D { .class_init =3D tcg_accel_ops_class_init, .abstract =3D true, }; +module_obj(ACCEL_OPS_NAME("tcg")); =20 static void tcg_accel_ops_register_types(void) { diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 00803f76d870..d6336a9c966d 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -238,6 +238,7 @@ static const TypeInfo tcg_accel_type =3D { .class_init =3D tcg_accel_class_init, .instance_size =3D sizeof(TCGState), }; +module_obj(TYPE_TCG_ACCEL); =20 static void register_accel_types(void) { --=20 2.31.1 From nobody Thu May 9 00:44:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623992693184590.4106265671321; Thu, 17 Jun 2021 22:04:53 -0700 (PDT) Received: from localhost ([::1]:41866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6gW-0003Xr-3C for importer@patchew.org; Fri, 18 Jun 2021 01:04:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YW-0007VK-Ln for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6YT-0005Dc-QT for qemu-devel@nongnu.org; Fri, 18 Jun 2021 00:56:36 -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-43-kLkNhtN7McqIySZUofvxVw-1; Fri, 18 Jun 2021 00:56:31 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00FBB8015C6; Fri, 18 Jun 2021 04:56:30 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 919D61001B2C; Fri, 18 Jun 2021 04:56:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3EF5A1803552; Fri, 18 Jun 2021 06:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623992193; 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=ob/rQNCzIY1cTCAOGsXMnSfmkxoxXN8wteC7GUj8UFA=; b=aFwBj6osxUP8N3blDkU1P3r9DJVKy0FNcADfaabULic5A/AxWxvOsg62MO3wAo/5bxRHtc E3QB+DX1uOid6IBNbNnBVKoFuwlmS1HiTSNX3o5F/owtdAX5nCvmQFZlPEv3z2+fnMquiX W+xrNo+NhwKLrwTeuvPyMMN8xqibGeU= X-MC-Unique: kLkNhtN7McqIySZUofvxVw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 24/24] accel: build tcg modular Date: Fri, 18 Jun 2021 06:53:53 +0200 Message-Id: <20210618045353.2510174-25-kraxel@redhat.com> In-Reply-To: <20210618045353.2510174-1-kraxel@redhat.com> References: <20210618045353.2510174-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Laurent Vivier , Kevin Wolf , Thomas Huth , Cornelia Huck , Eduardo Habkost , qemu-block@nongnu.org, David Hildenbrand , Peter Lieven , "Michael S. Tsirkin" , Richard Henderson , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Gerd Hoffmann , Ronnie Sahlberg , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Build tcg accel ops as module. Which is only a small fraction of tcg. Also only x86 for now. Signed-off-by: Gerd Hoffmann --- accel/tcg/meson.build | 5 ++++- meson.build | 14 +++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 1236ac7b910b..0ae9180282e3 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -15,8 +15,11 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) =20 specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files( 'cputlb.c', +)) + +tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files( 'tcg-accel-ops.c', 'tcg-accel-ops-mttcg.c', 'tcg-accel-ops-icount.c', - 'tcg-accel-ops-rr.c' + 'tcg-accel-ops-rr.c', )) diff --git a/meson.build b/meson.build index 8f55f563eefe..03bacca7cddb 100644 --- a/meson.build +++ b/meson.build @@ -92,6 +92,8 @@ if cpu in ['x86', 'x86_64'] } endif =20 +modular_tcg =3D ['i386-softmmu', 'x86_64-softmmu'] + edk2_targets =3D [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_= 64-softmmu' ] install_edk2_blobs =3D false if get_option('install_blobs') @@ -1311,6 +1313,11 @@ foreach target : target_dirs elif sym =3D=3D 'CONFIG_XEN' and have_xen_pci_passthrough config_target +=3D { 'CONFIG_XEN_PCI_PASSTHROUGH': 'y' } endif + if target in modular_tcg + config_target +=3D { 'CONFIG_TCG_MODULAR': 'y' } + else + config_target +=3D { 'CONFIG_TCG_BUILTIN': 'y' } + endif accel_kconfig +=3D [ sym + '=3Dy' ] endif endforeach @@ -1782,6 +1789,7 @@ util_ss =3D ss.source_set() =20 # accel modules qtest_module_ss =3D ss.source_set() +tcg_module_ss =3D ss.source_set() =20 modules =3D {} target_modules =3D {} @@ -2022,7 +2030,11 @@ subdir('tests/qtest/libqos') subdir('tests/qtest/fuzz') =20 # accel modules -target_modules +=3D { 'accel' : { 'qtest': qtest_module_ss }} +tcg_real_module_ss =3D ss.source_set() +tcg_real_module_ss.add_all(when: 'CONFIG_TCG_MODULAR', if_true: tcg_module= _ss) +specific_ss.add_all(when: 'CONFIG_TCG_BUILTIN', if_true: tcg_module_ss) +target_modules +=3D { 'accel' : { 'qtest': qtest_module_ss, + 'tcg': tcg_real_module_ss }} =20 ######################## # Library dependencies # --=20 2.31.1