From nobody Sun May 19 23:20:53 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 1624531241204657.8267726272653; Thu, 24 Jun 2021 03:40:41 -0700 (PDT) Received: from localhost ([::1]:50038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMmk-0000U4-J5 for importer@patchew.org; Thu, 24 Jun 2021 06:40:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMl9-0005xK-0J for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:38:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMl6-0006OH-FS for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:38: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-374-mpBU0TJuMtmQMti-JuU2fg-1; Thu, 24 Jun 2021 06:38:54 -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 BBF9D1934106; Thu, 24 Jun 2021 10:38:52 +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 761995C1BB; Thu, 24 Jun 2021 10:38:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E133C180079D; Thu, 24 Jun 2021 12:38:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531135; 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=Q13v+t/MjnvI5zVa7L24DfqwTxgdADNtvGiV7N6xQ/lDbxGEsQj9Y/yX518R2+2tupCMT/ mzgVjvmbLIuPMq2fV/CxDkEua5N1siXzwtw15XlD2dMCD+DwYlsTOSoLVkDkXDm4mC3QEM jSZxc/qFkNHVCFICqGC0IvZ71qgyt+I= X-MC-Unique: mpBU0TJuMtmQMti-JuU2fg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 01/34] modules: add modinfo macros Date: Thu, 24 Jun 2021 12:38:03 +0200 Message-Id: <20210624103836.2382472-2-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531533246147.57492380324925; Thu, 24 Jun 2021 03:45:33 -0700 (PDT) Received: from localhost ([::1]:41324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMrU-0005Qz-5t for importer@patchew.org; Thu, 24 Jun 2021 06:45:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlR-0006oP-7o for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36767) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlM-0006bi-VU for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:16 -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-162-4PHS5DFyPDm0sp4xlTDHww-1; Thu, 24 Jun 2021 06:39:09 -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 3564F804140; Thu, 24 Jun 2021 10:39: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 3E1941009962; Thu, 24 Jun 2021 10:38:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EE55518007A1; Thu, 24 Jun 2021 12:38:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531152; 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=0CzOIxD65y19koasVPSSkxnX2ji9OGc3vbKbbCFjB1g=; b=RoBgsPadIOTpwojr9nZPAxqAnJsBxop7wTz9sUnvMrGShezhErCWKsgdlLV1lHzR3vDCVJ JuGrTZEWGU6zoU0OrTaHFkYAcialSt1dnK43tBHFiwoJVkziCM6ak/3N8vD0MwZB2Q/b3Z i/SqBElSDpFPjCetwDoL1UxowAgDxM8= X-MC-Unique: 4PHS5DFyPDm0sp4xlTDHww-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 02/34] modules: collect module meta-data Date: Thu, 24 Jun 2021 12:38:04 +0200 Message-Id: <20210624103836.2382472-3-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- scripts/modinfo-collect.py | 67 ++++++++++++++++++++++++++++++++++++++ meson.build | 16 +++++++++ 2 files changed, 83 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 d8a92666fbcd..30ca06c6c2d4 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,19 @@ foreach d, list : modules else softmmu_mods +=3D sl endif + if module_ss.sources() !=3D [] + # FIXME: Should use sl.extract_all_objects(recursive: true) as + # input. Sources can be used multiple times but objects are + # unique when it comes to lookup in compile_commands.json. + # Depnds on a mesion version with + # https://github.com/mesonbuild/meson/pull/8900 + 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 Sun May 19 23:20:53 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 1624531253110667.5978298224105; Thu, 24 Jun 2021 03:40:53 -0700 (PDT) Received: from localhost ([::1]:51170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMmx-0001J8-QI for importer@patchew.org; Thu, 24 Jun 2021 06:40:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlF-000647-Lj for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMl8-0006Qh-KY for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:04 -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-289--cacTNEXPNOOpr6XgA0Jag-1; Thu, 24 Jun 2021 06:38:56 -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 B71FB106B7DB; Thu, 24 Jun 2021 10:38:54 +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 3B3945C1BB; Thu, 24 Jun 2021 10:38:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0CF3418007A6; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531138; 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=32lYhgKDoWdBOWDJ47yrXyUFVTwoHh26BD9yr4QhNTI=; b=gvJbgVlH09abdPniCiNBpxw6MQ0m+xKrCGlJeRowIYILdWl7j7irVav+vVbNzAJu/H0Dyn UXQk5prh7bdDDrQIgP7xqu3nSryueIAlQEwVzs2Su4bCUgUN9Z/9hUupxnVsdmpSkTCNE+ 3XPl9Yza1Q83uIrKEzF1h8GjOwcKOr8= X-MC-Unique: -cacTNEXPNOOpr6XgA0Jag-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 03/34] modules: generate modinfo.c Date: Thu, 24 Jun 2021 12:38:05 +0200 Message-Id: <20210624103836.2382472-4-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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..a6d98a6bc4cc --- /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-generate.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 feb4d201f30f..e001505d79f7 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 30ca06c6c2d4..6ae2b9ab9443 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 [] @@ -2047,7 +2048,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 @@ -2060,6 +2060,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 Sun May 19 23:20:53 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 1624531371844109.04892674534415; Thu, 24 Jun 2021 03:42:51 -0700 (PDT) Received: from localhost ([::1]:59864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMos-0007NO-Qa for importer@patchew.org; Thu, 24 Jun 2021 06:42:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlG-00067z-MG for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlB-0006Rs-Mv for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:06 -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-150-fBTzL6NqOxuxcKh2i1LbZg-1; Thu, 24 Jun 2021 06:38:58 -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 C90A9106B7D8; Thu, 24 Jun 2021 10:38: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 4EFAC5D6A1; Thu, 24 Jun 2021 10:38:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 17EE118007AD; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531140; 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=7qDK3g/dAQaSBJ6DbhLLYk83hf7h5AjLXuHNdEpcXhQ=; b=a9hYlMvJSTqXnH765uT1kqIfpJ1CtOKzWeiQCJy2urcwjdN/2X/BdpVOQZSRYWHygXfiiD BUHpgd26P00Htbsh3D0u4g/BrnLDIyBOCOdm/GLrv4GfSoJylWQxy19opmvcryuvhMmkwN zgSwMy9SfHnENV9aAqFzTB7st7VWqsY= X-MC-Unique: fBTzL6NqOxuxcKh2i1LbZg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 04/34] modules: check if all dependencies can be satisfied Date: Thu, 24 Jun 2021 12:38:06 +0200 Message-Id: <20210624103836.2382472-5-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , "Jose R. Ziviani" , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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" From: "Jose R. Ziviani" Verifies if all dependencies are correctly listed in the modinfo.c too and stop the builds if they're not. Signed-off-by: Jose R. Ziviani Signed-off-by: Gerd Hoffmann Reviewed-by: Jose R. Ziviani --- scripts/modinfo-generate.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py index a6d98a6bc4cc..f559eed0077a 100755 --- a/scripts/modinfo-generate.py +++ b/scripts/modinfo-generate.py @@ -59,6 +59,7 @@ def generate(name, lines): print_array("deps", deps) print_array("opts", opts) print("},{"); + return deps =20 def print_pre(): print("/* generated by scripts/modinfo-generate.py */") @@ -71,14 +72,26 @@ def print_post(): print("}};") =20 def main(args): + deps =3D {} 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) + deps[basename] =3D generate(basename, lines) print_post() =20 + flattened_deps =3D {flat.strip('" ') for dep in deps.values() for flat= in dep} + error =3D False + for dep in flattened_deps: + if dep not in deps.keys(): + print("Dependency {} cannot be satisfied".format(dep), + file=3Dsys.stderr) + error =3D True + + if error: + exit(1) + if __name__ =3D=3D "__main__": main(sys.argv[1:]) --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624531395769785.7477300824047; Thu, 24 Jun 2021 03:43:15 -0700 (PDT) Received: from localhost ([::1]:60908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMpG-000854-OP for importer@patchew.org; Thu, 24 Jun 2021 06:43:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlV-00074c-AW for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlS-0006go-Lt for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:21 -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-515-AgW2uwNuOv6D-q7S8Edq9Q-1; Thu, 24 Jun 2021 06:39:13 -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 B2B231934103; Thu, 24 Jun 2021 10:39:11 +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 3B3626090F; Thu, 24 Jun 2021 10:38:58 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 22AA21800840; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531158; 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=RWS58GTLvBs+Mjq1t3PrZTgVmXXRxKc/Ro9778eCsHnc0H+u5BfyffkZKFTkOV7SuOTa1R W7DVpEUYTy6LlFy9zaL/FZaG6NkDj/DVB6S34Kh8zXKc7gTNToIV/U/f1RaWJnye5+qZrp YQ7QFANnW1QMz9KIC0OUEdLC/1+zPgc= X-MC-Unique: AgW2uwNuOv6D-q7S8Edq9Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 05/34] modules: add qxl module annotations Date: Thu, 24 Jun 2021 12:38:07 +0200 Message-Id: <20210624103836.2382472-6-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 162453158483863.682031334033354; Thu, 24 Jun 2021 03:46:24 -0700 (PDT) Received: from localhost ([::1]:42930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMsJ-0006Uj-Kc for importer@patchew.org; Thu, 24 Jun 2021 06:46:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMli-0007hr-Qf for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlc-0006or-7p for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39: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-579-WDYsMXtiOu-szpCMWa_0yg-1; Thu, 24 Jun 2021 06:39:26 -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 42970362F9; Thu, 24 Jun 2021 10:39: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 C5DF660CCC; Thu, 24 Jun 2021 10:39:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3DF0D1800900; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531167; 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=c22n0G2j/dC3lA0h6OlE224qlSiLPjC5C+GiVcL+0yfs1JDr+V5zJqEg7IZKxOAUkqSB4V gJl+l1PnkHDlUlhcD+bEu6dHOkxCp8OGEWkPpP7dOZun9yF1Mv368DD34dx8lr04QK4tgR TSzv3QPeoP+PTw+SEmyKngNkmtw6VIY= X-MC-Unique: WDYsMXtiOu-szpCMWa_0yg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 06/34] modules: add virtio-gpu module annotations Date: Thu, 24 Jun 2021 12:38:08 +0200 Message-Id: <20210624103836.2382472-7-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531402856812.0992772067337; Thu, 24 Jun 2021 03:43:22 -0700 (PDT) Received: from localhost ([::1]:33252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMpN-0008UP-Kt for importer@patchew.org; Thu, 24 Jun 2021 06:43:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlh-0007f4-Bt for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMld-0006qD-Pu for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39: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-450-xpF5H4k-OI6sRPvfFue0Qw-1; Thu, 24 Jun 2021 06:39:28 -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 836DA106B7E0; Thu, 24 Jun 2021 10:39: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 2CB8C5C1BB; Thu, 24 Jun 2021 10:39:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4A7B11800902; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531169; 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=FYl8HmwxPasmz5ttMWAi7EUp28xm7FiVy/J2zLQz5vlm90YcS8IUUNWFymmih06Wj+cu5A HROq+7pUT7AWXp3Nb78yE7kZnwvRyeCmIniYEyOX1cxgboq4vB4MHnRRGRB9HEwUsX8SHW 3SxLYyfx/VVYdkX9SHApxqCl6sQ3nf0= X-MC-Unique: xpF5H4k-OI6sRPvfFue0Qw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 07/34] modules: add chardev module annotations Date: Thu, 24 Jun 2021 12:38:09 +0200 Message-Id: <20210624103836.2382472-8-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531459458449.1895327610189; Thu, 24 Jun 2021 03:44:19 -0700 (PDT) Received: from localhost ([::1]:36674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMqI-0002La-DK for importer@patchew.org; Thu, 24 Jun 2021 06:44:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlv-00087z-8C for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlr-0006yY-M2 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:46 -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-478-_qCmbgqlO2yBSQ6A8uZQ2g-1; Thu, 24 Jun 2021 06:39:41 -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 BB729362F9; Thu, 24 Jun 2021 10:39:39 +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 BF0E85D6A1; Thu, 24 Jun 2021 10:39:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5558B1800909; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531182; 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=grkfG6jfhtx+JSe/Mskl75uwdQ10zvDW2cea/ShtdGtQ2KlycbsEkPE7uQA07APkeSQuEG bvttFI1wtAPsLwgVHGzSwiFhm5Vwz5J+HBhNWK5c88k48GAtO0ya6DLObOTCJ2K6BN+y0q gxoqtIRgeYHxyp0pMrwFq0+0woLToVQ= X-MC-Unique: _qCmbgqlO2yBSQ6A8uZQ2g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 08/34] modules: add audio module annotations Date: Thu, 24 Jun 2021 12:38:10 +0200 Message-Id: <20210624103836.2382472-9-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531752149997.8645423965488; Thu, 24 Jun 2021 03:49:12 -0700 (PDT) Received: from localhost ([::1]:54058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMv1-0005Wk-5A for importer@patchew.org; Thu, 24 Jun 2021 06:49:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlo-0007p5-TX for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlg-0006t7-JJ for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:40 -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-31-0uiBxxhWPGSjqFuwAZpAfg-1; Thu, 24 Jun 2021 06:39:30 -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 6C88B8C5EC8; Thu, 24 Jun 2021 10:39:28 +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 E7A2860E3A; Thu, 24 Jun 2021 10:39:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5FF391800916; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531171; 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=a7H7GtaYrWM3xFxiMA2BEjaw9bECAMMFaUD9gosO8muoOKkklCbfHLzCk2k8qH3TMUDGxE Z/AZXnG3hcxQKgfyKwK9Ga+FkOEegTSRWEvkSnQ/beJ83A01W7x32B2JS9sMaxvlmRNe7B 9SHUd/vAvxVPqW6pH3ZehKs1Fd1O71w= X-MC-Unique: 0uiBxxhWPGSjqFuwAZpAfg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 09/34] modules: add usb-redir module annotations Date: Thu, 24 Jun 2021 12:38:11 +0200 Message-Id: <20210624103836.2382472-10-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531708716623.1156628618542; Thu, 24 Jun 2021 03:48:28 -0700 (PDT) Received: from localhost ([::1]:51370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMuH-0003jO-GZ for importer@patchew.org; Thu, 24 Jun 2021 06:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlx-0008IZ-R2 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMlv-00071o-8u for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:39: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-226-50WPMaR2NhKbShwT02qlUw-1; Thu, 24 Jun 2021 06:39:45 -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 F2F40106B7D9; Thu, 24 Jun 2021 10:39:43 +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 E7D5D1A26A; Thu, 24 Jun 2021 10:39:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6C6BD1800919; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531186; 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=VArvCUtDEKg7rhs2JOq4q9FCZ/JGtafcfdgqUAgE3R5dhcvOFiF14EWkdufpyqNdJDBdwO v96qFvGITwu3Engt3vuZBi+ZVTo4smnXg2AFWLI4ni5EuRQfRD2j4fZWNvXUnPN/KwhJFt 0gN0NuJ9ppPa7vmMKWJeBEiD6qdsU2c= X-MC-Unique: 50WPMaR2NhKbShwT02qlUw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 10/34] modules: add ccid module annotations Date: Thu, 24 Jun 2021 12:38:12 +0200 Message-Id: <20210624103836.2382472-11-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 162453161593948.12631762044532; Thu, 24 Jun 2021 03:46:55 -0700 (PDT) Received: from localhost ([::1]:45318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMsn-0008AG-Ri for importer@patchew.org; Thu, 24 Jun 2021 06:46:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmI-0000Qo-LP for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51131) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMm7-0007DT-FZ for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:09 -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-27-2CHkZW7VOpijG5neo-8OCw-1; Thu, 24 Jun 2021 06:39:57 -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 C77AA8C5EC0; Thu, 24 Jun 2021 10:39:55 +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 2C3B05D9F0; Thu, 24 Jun 2021 10:39:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7EC75180091A; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531198; 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=P7HV+QKQV41gz0nblPpCnj3O5H+h4w22FuJ5t0YDVbnaITsZfBqRekTQCCN1BtRITWkVdX cq7wuMqbAzVyOFDqyeoad02j4UUxL8ko0AmpsdshTmJotD/VHXR3Y8WsCoKSf4iH1Z9XIX bAobzUgJ40MFbCXHMO5eWtadd7U5mac= X-MC-Unique: 2CHkZW7VOpijG5neo-8OCw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 11/34] modules: add ui module annotations Date: Thu, 24 Jun 2021 12:38:13 +0200 Message-Id: <20210624103836.2382472-12-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531882234848.9127744626497; Thu, 24 Jun 2021 03:51:22 -0700 (PDT) Received: from localhost ([::1]:34584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMx6-0002sK-IU for importer@patchew.org; Thu, 24 Jun 2021 06:51:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmI-0000R8-QH for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmE-0007FQ-HJ for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40: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-495-Pv0Mv8jEMW-GBiGx1j3Hkg-1; Thu, 24 Jun 2021 06:40:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7541A1934102; Thu, 24 Jun 2021 10:40:00 +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 69A3A17C5F; Thu, 24 Jun 2021 10:39:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8A627180091C; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531203; 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=AQaytpLTKpShEgsHFdEPeWBE+/Q3WI8tzQHw8Si/cPYr79GqJv/xcBMeycJldnXM7y5FLj c2ykFEGv8O8wX7iBUeyM+YxaRKsHWUjgpACAig+s+kBMZ5+khFYCUojAVmGE6/TIbLbOCy Vk4Ciq0Of42WO5CG4njs6zWNlQ9jMY0= X-MC-Unique: Pv0Mv8jEMW-GBiGx1j3Hkg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 12/34] modules: add s390x module annotations Date: Thu, 24 Jun 2021 12:38:14 +0200 Message-Id: <20210624103836.2382472-13-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531763103360.9412622307859; Thu, 24 Jun 2021 03:49:23 -0700 (PDT) Received: from localhost ([::1]:55044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMvC-0006AL-3P for importer@patchew.org; Thu, 24 Jun 2021 06:49:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmQ-0000ml-TF for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmO-0007Ln-29 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40: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-43-496OpG7uO1-iSOHsoPaduA-1; Thu, 24 Jun 2021 06:40:14 -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 368E9804141; Thu, 24 Jun 2021 10:40: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 6C7C360871; Thu, 24 Jun 2021 10:39:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9541F180091D; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531215; 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=byJYgNvKmwzTc+L1UGS8KKg25hi12CFBXtE4xWkUbIORPGlGs7Aj6T7a+ns/+XhDHJyRBd ifVLbE2tVwFp+xlvfFDpomFYzbdMg4LYuLl8jHWwQL8+P8RvFT4yCoqQRCmWuHBHqyLt4z ilWLMFJaglA6kgTs+0t7513rovDQot0= X-MC-Unique: 496OpG7uO1-iSOHsoPaduA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 13/34] modules: add block module annotations Date: Thu, 24 Jun 2021 12:38:15 +0200 Message-Id: <20210624103836.2382472-14-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531616463576.5426217851376; Thu, 24 Jun 2021 03:46:56 -0700 (PDT) Received: from localhost ([::1]:45460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMsp-0008GF-Em for importer@patchew.org; Thu, 24 Jun 2021 06:46:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmZ-0001Hz-T1 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmX-0007XR-E3 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:27 -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-425-NoMoEedIMf60XwSWj0AKIQ-1; Thu, 24 Jun 2021 06:40:23 -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 A4AB0106B7DB; Thu, 24 Jun 2021 10:40:21 +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 E631F5D9F0; Thu, 24 Jun 2021 10:40:01 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A03871800D7B; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531224; 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=z1pz9k2rmmLhyDliV2lpJY1rQ+SZks4bTgvJ1TED7xA=; b=ctYE8bayntDl2YDmFbHqv7oE1FulcyXZi3O4Juyel6xidM1V3sayst9F8vUvqJgflzb0C0 dCpCqljTytqmHKKOcckYKmnpOOB3iT2cOMXZoveJGhTgdjz80xIIQkaHWc0qrtt6/frO+K b5WpQWBIrHkcxtuZfaHeSpcBvL3mBmE= X-MC-Unique: NoMoEedIMf60XwSWj0AKIQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 14/34] modules: use modinfo for dependencies Date: Thu, 24 Jun 2021 12:38:16 +0200 Message-Id: <20210624103836.2382472-15-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 162453175435471.6389407689511; Thu, 24 Jun 2021 03:49:14 -0700 (PDT) Received: from localhost ([::1]:54248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMv3-0005eC-9u for importer@patchew.org; Thu, 24 Jun 2021 06:49:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmh-0001hF-8R for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmf-0007eh-8M for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40: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-602-oHyH_RPnPIOZRujbQOQwoA-1; Thu, 24 Jun 2021 06:40:29 -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 A9B55804145; Thu, 24 Jun 2021 10:40:27 +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 B77935D6A1; Thu, 24 Jun 2021 10:40:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AB5231803545; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531232; 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=upufv3ee/3vKBjf7VZFCoBl3nYBb7SBkOzTa1s1mn0o=; b=ivQECWXRKzHmQva2YsrUIubs/kutA4GabtSUtT2DELLfds2FE56kN3YXAkP8dlR95/LStG eGP646R/Hh1if4mqCOd7j+s+UYvbvoW7OLL1r1Jwt09Rz13zqvylXmrHLplqzfEpoCFpk8 Exu4CO9IFZst2+id9tW8Zn6V+IvRD28= X-MC-Unique: oHyH_RPnPIOZRujbQOQwoA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 15/34] modules: use modinfo for qom load Date: Thu, 24 Jun 2021 12:38:17 +0200 Message-Id: <20210624103836.2382472-16-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624532124231625.1697713878402; Thu, 24 Jun 2021 03:55:24 -0700 (PDT) Received: from localhost ([::1]:49612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN10-0004TC-UB for importer@patchew.org; Thu, 24 Jun 2021 06:55:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmr-0002HQ-Bk for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmn-0007lH-HV for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:45 -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-317-G2f7xLolOwiHXsDYW76f1Q-1; Thu, 24 Jun 2021 06:40:39 -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 59A6F100C609; Thu, 24 Jun 2021 10:40:37 +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 53EA060CCC; Thu, 24 Jun 2021 10:40:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BA29D1803546; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531240; 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=D/bXIG09hYZhS65KPP0cOBUtgVTWw6OXVodp3CnFZz0=; b=QLIkdO5zlLq0XzzxiUmtttZatl1An5ZCa53+Tr/+FOxqkVDmPUfnRALtkw4TRcQsIbDBvR r9E9XODYUO2Um5cN/tb6nmyaeANYMCKxJb+NbqEA41WTwBH7zOJccOij6k69CVk1+1cMP6 JMQ4Q9KMxbM0SXugYWc+O2Or7PAbOTs= X-MC-Unique: G2f7xLolOwiHXsDYW76f1Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 16/34] modules: use modinfo for qemu opts load Date: Thu, 24 Jun 2021 12:38:18 +0200 Message-Id: <20210624103836.2382472-17-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 e001505d79f7..5c26e80126db 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 Sun May 19 23:20:53 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 1624531894237253.2147545651443; Thu, 24 Jun 2021 03:51:34 -0700 (PDT) Received: from localhost ([::1]:35242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMxI-0003Ij-Uk for importer@patchew.org; Thu, 24 Jun 2021 06:51:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMms-0002Jy-22 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMmn-0007ku-9E for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:45 -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-349-rsm_9FSZNcmClJz9phTlcw-1; Thu, 24 Jun 2021 06:40:39 -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 5E4531934103; Thu, 24 Jun 2021 10:40:37 +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 4E5CF61093; Thu, 24 Jun 2021 10:40:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C67B01803547; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531240; 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=JwvLM6L2h6dTkp+855G0fH5y+BHzDnqvEwRO+By5avnwPcKs6d32gxj2fUFgFZ4DpeUqqT PElFmV+K3XHc79mDDjYjuaapnYY+mKwdyCv0a1aQojScb30Uo0JxsadGrIvUddNDKEUF4M 6QSg5NoU4yJJbOykWv1PGciKTwsklZM= X-MC-Unique: rsm_9FSZNcmClJz9phTlcw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 17/34] modules: add tracepoints Date: Thu, 24 Jun 2021 12:38:19 +0200 Message-Id: <20210624103836.2382472-18-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624532316794146.3920332905518; Thu, 24 Jun 2021 03:58:36 -0700 (PDT) Received: from localhost ([::1]:59156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN47-0002Ue-Go for importer@patchew.org; Thu, 24 Jun 2021 06:58:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMn6-00035w-69 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMn2-0007y4-5S for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:40:59 -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-174-pZbp-_84OLuBW-lgxXESyQ-1; Thu, 24 Jun 2021 06:40: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 B718B100C612; Thu, 24 Jun 2021 10:40:52 +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 02D5E5D705; Thu, 24 Jun 2021 10:40:39 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D5B331803548; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531255; 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=knRgM+8UyobiMtp7tpNcTHLWowdvknC6HlopWI5dqPQ=; b=Ba5nDLZUvQApg14GpMUDwnK/RCNOkZkid9OAWwqjVzSjHn47GXMzubDt4U4HSG6mG1KTTM SS47XSs8VF5dat/kUVIhcK4c7cna65SBFiMNxsmWPYOhO7JATIRBf7PFPQ4+BWdMh26vMn BivJcK5PDMS1Z3oOyVASnl+wqQefNLk= X-MC-Unique: pZbp-_84OLuBW-lgxXESyQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 18/34] modules: check arch and block load on mismatch Date: Thu, 24 Jun 2021 12:38:20 +0200 Message-Id: <20210624103836.2382472-19-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 5c26e80126db..a70e7b4658e8 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 Sun May 19 23:20:53 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 1624532532129300.89530423767405; Thu, 24 Jun 2021 04:02:12 -0700 (PDT) Received: from localhost ([::1]:40392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN7a-0000Ws-Tt for importer@patchew.org; Thu, 24 Jun 2021 07:02:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMn6-00036a-KE for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMn2-0007yH-S5 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:00 -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-37-rCaezko2MYmkI3Z5kaIw1A-1; Thu, 24 Jun 2021 06:40: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 ACECC804141; Thu, 24 Jun 2021 10:40:52 +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 F3ECD5D6CF; Thu, 24 Jun 2021 10:40:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E0AEA1803549; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531255; 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=HK8q9Cz5dz08qrGeJZg5i3E8XHipYjjHrAAdu+XHFL241vk6tEjxyZVX9VsqBeAWbt56hN J9TlGUBLuXWLA1or7NXS6qLVTKxo9nLvuPy/BGqaajwSAgrq+xgeqS4upQ3r4UK+5quPVb 08TtCmKVDue8/gOhxROEk328upsKmrE= X-MC-Unique: rCaezko2MYmkI3Z5kaIw1A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 19/34] modules: check arch on qom lookup Date: Thu, 24 Jun 2021 12:38:21 +0200 Message-Id: <20210624103836.2382472-20-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624531964001661.2553903592124; Thu, 24 Jun 2021 03:52:44 -0700 (PDT) Received: from localhost ([::1]:39394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMyQ-0006A2-Rw for importer@patchew.org; Thu, 24 Jun 2021 06:52:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnL-00040A-8N for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54167) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnI-0008AD-3d for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41: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-140-st5c5T9MOzCPZ0puYgSX5A-1; Thu, 24 Jun 2021 06:41: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 945E1106B7DB; Thu, 24 Jun 2021 10:41: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 505B560871; Thu, 24 Jun 2021 10:40:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EB8B8180354A; Thu, 24 Jun 2021 12:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531271; 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=5+BKDlmPA7NNdhmix8TmXxQQehHJQ81Rtjwtzs/AW4A=; b=XYWKUUJnxKfz8c8CnP/9DjIQ9O+7ffvftSP11aZblIrQ5mSfLCf5xs9nWgAalubOV1w7Cy CF7pXfCYkHTq2fYnXfXUWAHKyOwVDljl/oRukS3bBzXN0WdAmHYxg1liofq2E458s6HQeX iRye2xvoQWa0HwQCNsc2NY4iJoWt6uU= X-MC-Unique: st5c5T9MOzCPZ0puYgSX5A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 20/34] modules: target-specific module build infrastructure Date: Thu, 24 Jun 2021 12:38:22 +0200 Message-Id: <20210624103836.2382472-21-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- meson.build | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/meson.build b/meson.build index 6ae2b9ab9443..76020b43fb32 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 {} @@ -2060,6 +2061,42 @@ 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 + # FIXME: Should use sl.extract_all_objects(recursive: true) to= o. + 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 Sun May 19 23:20:53 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 1624532054303422.2089588738012; Thu, 24 Jun 2021 03:54:14 -0700 (PDT) Received: from localhost ([::1]:45240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMzs-0001aq-Mp for importer@patchew.org; Thu, 24 Jun 2021 06:54:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnO-0004EC-RN for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnI-0008AS-KJ for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41: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-440-lpPdkHdmPSGvdvClsJqqBA-1; Thu, 24 Jun 2021 06:41:10 -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 08B7536306; Thu, 24 Jun 2021 10:41: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 55B765D9F0; Thu, 24 Jun 2021 10:40:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 03696180354B; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531271; 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=rHIChWgkOKd/ty+O8y/YBUb6p7lpc7qKzmuQYkr/5Ig=; b=KRSd3HlszqK9KCbfM7rNsp0OnCkcI0WNj7R99dYrMnpaVXLBBIoKVC/2JuppQtpAjPADbJ IB+nncB4+kC5lrw0iycWUSio5FoxHndu8Aj2pA0mFDCNIOJ+w/P1mjLmkC/GDZ3H82JCHO +W1JH4HqP5UxRUbGuaCAFP6BTzhF8dk= X-MC-Unique: lpPdkHdmPSGvdvClsJqqBA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 21/34] modules: add documentation for module sourcesets Date: Thu, 24 Jun 2021 12:38:23 +0200 Message-Id: <20210624103836.2382472-22-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Paolo Bonzini Reviewed-by: Jose R. Ziviani --- docs/devel/build-system.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 7ef36f42d0f5..fd1650442ecc 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -272,6 +272,23 @@ Target-dependent emulator sourcesets: target_arch +=3D {'arm': arm_ss} target_softmmu_arch +=3D {'arm': arm_softmmu_ss} =20 +Module sourcesets: + There are two dictionaries for modules: `modules` is used for + target-independent modules and `target_modules` is used for + target-dependent modules. When modules are disabled the `module` + source sets are added to `softmmu_ss` and the `target_modules` + source sets are added to `specific_ss`. + + Both dictionaries are nested. One dictionary is created per + subdirectory, and these per-subdirectory dictionaries are added to + the toplevel dictionaries. For example:: + + hw_display_modules =3D {} + qxl_ss =3D ss.source_set() + ... + hw_display_modules +=3D { 'qxl': qxl_ss } + modules +=3D { 'hw-display': hw_display_modules } + Utility sourcesets: All binaries link with a static library `libqemuutil.a`. This library is built from several sourcesets; most of them however host generated --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624531961138678.3736414413509; Thu, 24 Jun 2021 03:52:41 -0700 (PDT) Received: from localhost ([::1]:39238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwMyN-00063m-2Z for importer@patchew.org; Thu, 24 Jun 2021 06:52:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnb-0004pl-PE for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31391) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnY-0008RM-Jy for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:31 -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-25-NnZL6uXdOb6-2P7_uQ_ZGA-1; Thu, 24 Jun 2021 06:41:26 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CAF15100C609; Thu, 24 Jun 2021 10:41: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 3CADB69CB4; Thu, 24 Jun 2021 10:41:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0E08D180354C; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531288; 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=GUBBwlUSpy2dTqkMTbIzZFfLigpsADB6Fv/nv7nGKoc=; b=GvT1X2scL25SDqLdnZCkl8wg24Ofxka9G+lu1a3dOV95GVUWOydIPZt5GWDd2IpcNR4mnk hYeXmA8MV34AwofYlSIFrF9bAo8bamsBz44oznVP7gQWU9NDXJueF2kBMkWWA83ecrcfl5 uMoBTI9rwZ1FEioDuZL1aiGaGDJU2TU= X-MC-Unique: NnZL6uXdOb6-2P7_uQ_ZGA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 22/34] modules: add module_obj() note to QOM docs Date: Thu, 24 Jun 2021 12:38:24 +0200 Message-Id: <20210624103836.2382472-23-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Paolo Bonzini Reviewed-by: Jose R. Ziviani --- docs/devel/qom.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index 42d0dc4f4da8..e5fe3597cd82 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -87,6 +87,14 @@ specific type: #define MY_DEVICE(obj) \ OBJECT_CHECK(MyDevice, obj, TYPE_MY_DEVICE) =20 +In case the ObjectClass implementation can be built as module a +module_obj() line must be added to make sure qemu loads the module +when the object is needed. + +.. code-block:: c + + module_obj(TYPE_MY_DEVICE); + Class Initialization =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624532738612483.9548677442416; Thu, 24 Jun 2021 04:05:38 -0700 (PDT) Received: from localhost ([::1]:50090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwNAv-0007Ox-61 for importer@patchew.org; Thu, 24 Jun 2021 07:05:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnP-0004Hd-Q1 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnN-0008EP-Ab for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41: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-294-E-cHfGUWN0qt0CADoYlM0Q-1; Thu, 24 Jun 2021 06:41:13 -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 CB619106B7D9; Thu, 24 Jun 2021 10:41:11 +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 8AD5812C82; Thu, 24 Jun 2021 10:41:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 19084180354D; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531276; 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=GHhZ0iFD7up5OuQYLPNfL9AotYzSHkNm/MlSW7fq0G0=; b=SxyyOnZKOR3N6cfCxM1P/ahmuWwc9BHgauu05kToPpw7olSteGQGvjrNbYODYzy5pGFuGI A16kcJhwvf7R/TCAUm5kB9Tz186GmVP2v5JCCXKa0CcKZOHoa1M4x8IlhFvWGFVRV9mTLY M1WEqrKafvs/6WGnc+Ldrl+aKmLV/q4= X-MC-Unique: E-cHfGUWN0qt0CADoYlM0Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 23/34] modules: module.h kerneldoc annotations Date: Thu, 24 Jun 2021 12:38:25 +0200 Message-Id: <20210624103836.2382472-24-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Paolo Bonzini Reviewed-by: Jose R. Ziviani --- include/qemu/module.h | 59 +++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 7f4b1af8198c..8bc80535a4d4 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -74,11 +74,18 @@ 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 +/** + * DOC: module info annotation macros * - * scripts/modinfo-collect.py will collect module info, - * using the preprocessor and -DQEMU_MODINFO + * `scripts/modinfo-collect.py` will collect module info, + * using the preprocessor and -DQEMU_MODINFO. + * + * `scripts/modinfo-generate.py` will create a module meta-data database + * from the collected information so qemu knows about module + * dependencies and QOM objects implemented by modules. + * + * See `*.modinfo` and `modinfo.c` in the build directory to check the + * script results. */ #ifdef QEMU_MODINFO # define modinfo(kind, value) \ @@ -87,24 +94,48 @@ void module_allow_arch(const char *arch); # define modinfo(kind, value) #endif =20 -/* module implements QOM type */ +/** + * module_obj + * + * @name: QOM type. + * + * This module implements QOM type @name. + */ #define module_obj(name) modinfo(obj, name) =20 -/* module has a dependency on */ +/** + * module_dep + * + * @name: module name + * + * This module depends on module @name. + */ #define module_dep(name) modinfo(dep, name) =20 -/* module is for target architecture */ +/** + * module_arch + * + * @arch: target architecture + * + * This module is for target architecture @arch. + * + * Note that target-dependent modules are tagged automatically, so + * this is only needed in case target-independent modules should be + * restricted. Use case example: the ccw bus is implemented by s390x + * only. + */ #define module_arch(name) modinfo(arch, name) =20 -/* module registers QemuOpts */ +/** + * module_opts + * + * @name: QemuOpts name + * + * This module registers QemuOpts @name. + */ #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 - */ +/* module info database (created by scripts/modinfo-generate.py) */ typedef struct QemuModinfo QemuModinfo; struct QemuModinfo { const char *name; --=20 2.31.1 From nobody Sun May 19 23:20:53 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 162453218891472.52356072773478; Thu, 24 Jun 2021 03:56:28 -0700 (PDT) Received: from localhost ([::1]:52308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN23-0006GU-Pm for importer@patchew.org; Thu, 24 Jun 2021 06:56:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnd-0004pp-Jm for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnb-0008Ug-EO for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41: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-433-83Vgh_XLNlOvbCJH-zRHxA-1; Thu, 24 Jun 2021 06:41:29 -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 DDE38106B7E1; Thu, 24 Jun 2021 10:41:27 +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 47F31E2C4; Thu, 24 Jun 2021 10:41:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2520E180354E; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531290; 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=DGr4faTSM2mag8KxYNheAXSiHdisAoqcnaOHmS9tkPk=; b=XJW09qfvo6D7HP3+B6N5YdOgJlScZUYtd+N66PZQgEcfQK6LztbnkLiiSj5X65Dbrk/0D1 7qKOagOOkXrWJUJGJ5t6k1cDn0g7HhkG1rmwTSzgRhWrllOOuRHiv09DhvInF6WsCwp5J8 btn+saK3KYM+/AGkIM1i8UZ0kBf+Vd4= X-MC-Unique: 83Vgh_XLNlOvbCJH-zRHxA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 24/34] modules: hook up modules.h to docs build Date: Thu, 24 Jun 2021 12:38:26 +0200 Message-Id: <20210624103836.2382472-25-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Paolo Bonzini Reviewed-by: Jose R. Ziviani --- docs/devel/index.rst | 1 + docs/devel/modules.rst | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 docs/devel/modules.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst index 977c3893bdaf..ba90badbbd6d 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -41,6 +41,7 @@ Contents: s390-dasd-ipl clocks qom + modules block-coroutine-wrapper multi-process ebpf_rss diff --git a/docs/devel/modules.rst b/docs/devel/modules.rst new file mode 100644 index 000000000000..066f347b89ba --- /dev/null +++ b/docs/devel/modules.rst @@ -0,0 +1,5 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Qemu modules +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. kernel-doc:: include/qemu/module.h --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624532336117918.1529439772293; Thu, 24 Jun 2021 03:58:56 -0700 (PDT) Received: from localhost ([::1]:32876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN4R-0003nP-29 for importer@patchew.org; Thu, 24 Jun 2021 06:58:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnq-0005If-V4 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMno-0000E5-UH for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:46 -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-592-iJA1pgiQOymTiyBgb92Omw-1; Thu, 24 Jun 2021 06:41:43 -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 7D00E1934100; Thu, 24 Jun 2021 10:41:41 +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 7A4AC5D9F0; Thu, 24 Jun 2021 10:41:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 31B3F180354F; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531304; 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=ABUSMq9Wff59DgjAp6EIWG+pP4G6BATHxVV+FObXfMzOlylopyts+2RBZyVGgpRfIOVgZx Ej7hNbwvek1UYG56Btep5dGVwV0JV6NIyeuXU3wGAODjUPQfpi3XYimdtXNUlsZ4WhamU0 fripglSqHq9T4zX1U3niN7V1X5YQ9f4= X-MC-Unique: iJA1pgiQOymTiyBgb92Omw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 25/34] accel: autoload modules Date: Thu, 24 Jun 2021 12:38:27 +0200 Message-Id: <20210624103836.2382472-26-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624532975390718.2167991834983; Thu, 24 Jun 2021 04:09:35 -0700 (PDT) Received: from localhost ([::1]:59672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwNEj-00067n-TF for importer@patchew.org; Thu, 24 Jun 2021 07:09:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnt-0005Sh-G3 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnq-0000Fy-9d for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41: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-32-z0z1LE5NN4GxfFMgAtFTrQ-1; Thu, 24 Jun 2021 06:41:44 -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 C5D5D804140; Thu, 24 Jun 2021 10:41:42 +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 71C305C1BB; Thu, 24 Jun 2021 10:41:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3CCEE1803550; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531305; 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=HrQUMX36TuM/Z/ehvz9mlS67ngl9FwkzmLPveowfMy1Guj4WXBfLsYWSb82gd5nbhMWW7l 2mDaRbdvxeSibnMRBvLxiL3WHRNM8zBEEITgywSHacpsGv838gCi76lOqp5shJG2wLKGAp 6JVoxuArIl7vOboevnreiRAu7KB0J/U= X-MC-Unique: z0z1LE5NN4GxfFMgAtFTrQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 26/34] accel: add qtest module annotations Date: Thu, 24 Jun 2021 12:38:28 +0200 Message-Id: <20210624103836.2382472-27-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624532259860338.48566093111833; Thu, 24 Jun 2021 03:57:39 -0700 (PDT) Received: from localhost ([::1]:55792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN3C-0000D0-92 for importer@patchew.org; Thu, 24 Jun 2021 06:57:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnv-0005Yj-3N for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMnr-0000Gx-Fa for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:41:50 -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-247-621d9KK4Opa3PiVvu2RZ-Q-1; Thu, 24 Jun 2021 06:41:45 -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 7E02B106B7DB; Thu, 24 Jun 2021 10:41:43 +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 35F1A5D9F0; Thu, 24 Jun 2021 10:41:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4AF751803551; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531306; 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=uPViM2vkS1TedlRKpZgT+/BJXqdvrf0hBcYCAYIaiis=; b=LuQ3fkIyc/t9iMOx1KVrs2f7SINJsjXab0IoPYsTCJZ7wRpa/fKnhg4yI++zjVhbJyKSs6 BnmG9Y13idRRWf4k6eu4TwC8YNDyph1ptnVH5jxPmyotPWT0Ap1Ptw912I4/iW0GJoUWqZ UAtZOWF2RAVa86LLzvl1R8RhU/J6y14= X-MC-Unique: 621d9KK4Opa3PiVvu2RZ-Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 27/34] accel: build qtest modular Date: Thu, 24 Jun 2021 12:38:29 +0200 Message-Id: <20210624103836.2382472-28-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 76020b43fb32..d2cacc145a91 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 Sun May 19 23:20:53 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 1624532413663217.33275038868578; Thu, 24 Jun 2021 04:00:13 -0700 (PDT) Received: from localhost ([::1]:37070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN5g-0006aT-CM for importer@patchew.org; Thu, 24 Jun 2021 07:00:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoC-0006aD-DH for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMo9-0000b5-9T for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:08 -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-232-SIhmYCRcNxCx67O7CRzuCw-1; Thu, 24 Jun 2021 06:42:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B13408C5EC6; Thu, 24 Jun 2021 10:42:01 +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 3DD7D60583; Thu, 24 Jun 2021 10:41:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5687B1803552; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531324; 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=bp5CMWaJKzDjUsieUMBMw6+FyLikuFuwVeVKTRvUTMCC815Nd8/CiVaoBenX6KJJxkwsGk xBVDmBo2uWpf33I4pkPvz/2zdwGC1NgyIX9d4TjgAGfpqTI3kQ/7UmobqWGzrsl+dZ7ted gTdkDJQMr/8MkXs/Fu7uL2PfLsQ54ME= X-MC-Unique: SIhmYCRcNxCx67O7CRzuCw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 28/34] accel: add tcg module annotations Date: Thu, 24 Jun 2021 12:38:30 +0200 Message-Id: <20210624103836.2382472-29-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 Sun May 19 23:20:53 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 1624533197986486.8043132992633; Thu, 24 Jun 2021 04:13:17 -0700 (PDT) Received: from localhost ([::1]:41102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwNIK-0004PL-Vn for importer@patchew.org; Thu, 24 Jun 2021 07:13:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMo6-0006Dk-J9 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMo3-0000V3-4o for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:02 -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-402-jYwEwTAlOSGiVHYSeG-fSQ-1; Thu, 24 Jun 2021 06:41:57 -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 75938804140; Thu, 24 Jun 2021 10:41:55 +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 EBFEF60CCC; Thu, 24 Jun 2021 10:41:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 634E11803553; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531318; 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=4qr7iH+dVmCBCyjLknApkCwKC+SzynUInQNKaH1p9eE=; b=A1aWHKh1wggPJ12RFx52IJmkX3pf9V2CgiJPWoQ9U0qCFkEhUiAlQkTWqtetUkJ1CEQN5p 4FEAy6ot4WQeI5LogeR6iIP7Dyp0OsI5DJenXqoEnWTXrBQe8H6wX2t5VZGu2mzcXZJfqt 6IdWHXXLiIO4qa2po9LWdQq2cvvtf5w= X-MC-Unique: jYwEwTAlOSGiVHYSeG-fSQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 29/34] accel: build tcg modular Date: Thu, 24 Jun 2021 12:38:31 +0200 Message-Id: <20210624103836.2382472-30-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- 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 d2cacc145a91..9f1ca4177073 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 From nobody Sun May 19 23:20:53 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 1624532635472188.15352186281268; Thu, 24 Jun 2021 04:03:55 -0700 (PDT) Received: from localhost ([::1]:45658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN9G-0004JM-LX for importer@patchew.org; Thu, 24 Jun 2021 07:03:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoa-0007Zk-Rg for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoS-0000rS-7b for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:32 -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-513-FDve_AW_O1epmCISCz_3Dw-1; Thu, 24 Jun 2021 06:42:21 -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 46C67100C619; Thu, 24 Jun 2021 10:42:19 +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 13BCF60E3A; Thu, 24 Jun 2021 10:41:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 72BFA1803554; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531342; 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=LwdLbExeA9Nvec4TRFAJpOyf9hvd2ZFG3xB/eD7w26g=; b=fbEbpEsCqX6ANktMlhJQxXIghDdSEtboc4F3A4vZyd2UoQlCMykB5dPj6sY9mwVLmczboY oS7jnz3qGIDQYWjR3u5B+LlNGsBB75lmTgOUacUvc+55yma+zIzi9XoIvl3Ne1QPISRuDI iWrAnvPAIV7HXcTmpgiSkrJU7LQkzHY= X-MC-Unique: FDve_AW_O1epmCISCz_3Dw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 30/34] monitor: allow register hmp commands Date: Thu, 24 Jun 2021 12:38:32 +0200 Message-Id: <20210624103836.2382472-31-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 commands having a NULL cmd pointer, add a function to set the pointer later. Use case: allow modules implement hmp commands. Signed-off-by: Gerd Hoffmann Reviewed-by: Jose R. Ziviani --- include/monitor/monitor.h | 3 +++ monitor/hmp.c | 7 +++++++ monitor/misc.c | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 1211d6e6d69f..1a8a369b50b2 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -51,4 +51,7 @@ int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags); void monitor_fdset_dup_fd_remove(int dup_fd); int64_t monitor_fdset_dup_fd_find(int dup_fd); =20 +void monitor_register_hmp(const char *name, bool info, + void (*cmd)(Monitor *mon, const QDict *qdict)); + #endif /* MONITOR_H */ diff --git a/monitor/hmp.c b/monitor/hmp.c index 6c0b33a0b19d..d50c3124e1e1 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -1089,6 +1089,13 @@ void handle_hmp_command(MonitorHMP *mon, const char = *cmdline) return; } =20 + if (!cmd->cmd) { + /* FIXME: is it useful to try autoload modules here ??? */ + monitor_printf(&mon->common, "Command \"%.*s\" is not available.\n= ", + (int)(cmdline - cmd_start), cmd_start); + return; + } + qdict =3D monitor_parse_arguments(&mon->common, &cmdline, cmd); if (!qdict) { while (cmdline > cmd_start && qemu_isspace(cmdline[-1])) { diff --git a/monitor/misc.c b/monitor/misc.c index 1539e18557f0..ad476c6e51ea 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -1974,6 +1974,22 @@ static void sortcmdlist(void) compare_mon_cmd); } =20 +void monitor_register_hmp(const char *name, bool info, + void (*cmd)(Monitor *mon, const QDict *qdict)) +{ + HMPCommand *table =3D info ? hmp_info_cmds : hmp_cmds; + + while (table->name !=3D NULL) { + if (strcmp(table->name, name) =3D=3D 0) { + g_assert(table->cmd =3D=3D NULL); + table->cmd =3D cmd; + return; + } + table++; + } + g_assert_not_reached(); +} + void monitor_init_globals(void) { monitor_init_globals_core(); --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624532607030119.47829220364508; Thu, 24 Jun 2021 04:03:27 -0700 (PDT) Received: from localhost ([::1]:43538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN8o-0002lq-4b for importer@patchew.org; Thu, 24 Jun 2021 07:03:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoU-0007Mh-F9 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoR-0000rL-G6 for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:25 -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-525-IQ3DklNJMXyu9G9qhIqBRA-1; Thu, 24 Jun 2021 06:42:21 -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 746C6106B7DF; Thu, 24 Jun 2021 10:42:19 +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 55D0A5D9F0; Thu, 24 Jun 2021 10:42:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8CEF11803555; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531342; 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=aW3Yh7aCT487AnoyNPyO5X1fiSDPAABiJ0kmhsQQXbE=; b=PG1GTS27a4H6tjZsSqb/4sO9K576C9ncuAO9KLwVyhWiFUiAOADS8lSDkQnA204Ekc9ZqH ycAhO009vhavA9HJxC1YDGUUlHEXiKpzgleyb9dM5sPhKvjYyEex3pOu8HzQIz77Ce4BJ4 /OctdSi9vXxqgNBdNo4w4/r3uWgAPqQ= X-MC-Unique: IQ3DklNJMXyu9G9qhIqBRA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 31/34] usb: drop usb_host_dev_is_scsi_storage hook Date: Thu, 24 Jun 2021 12:38:33 +0200 Message-Id: <20210624103836.2382472-32-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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" Introduce an usb device flag instead, set it when usb-host looks at the device descriptors anyway. Also set it for emulated storage devices, for consistency. Add an inline helper function to check the flag. Signed-off-by: Gerd Hoffmann Acked-by: David Gibson Reviewed-by: Jose R. Ziviani --- include/hw/usb.h | 7 ++++++- hw/ppc/spapr.c | 2 +- hw/usb/dev-storage-bot.c | 1 + hw/usb/dev-storage-classic.c | 1 + hw/usb/dev-uas.c | 1 + hw/usb/host-libusb.c | 36 +++++++----------------------------- hw/usb/host-stub.c | 5 ----- 7 files changed, 17 insertions(+), 36 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 436e07b30404..33668dd0a99a 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -219,6 +219,7 @@ enum USBDeviceFlags { USB_DEV_FLAG_IS_HOST, USB_DEV_FLAG_MSOS_DESC_ENABLE, USB_DEV_FLAG_MSOS_DESC_IN_USE, + USB_DEV_FLAG_IS_SCSI_STORAGE, }; =20 /* definition of a USB device */ @@ -465,7 +466,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBP= acket *p); =20 /* usb-linux.c */ void hmp_info_usbhost(Monitor *mon, const QDict *qdict); -bool usb_host_dev_is_scsi_storage(USBDevice *usbdev); =20 /* usb ports of the VM */ =20 @@ -561,6 +561,11 @@ const char *usb_device_get_product_desc(USBDevice *dev= ); =20 const USBDesc *usb_device_get_usb_desc(USBDevice *dev); =20 +static inline bool usb_device_is_scsi_storage(USBDevice *dev) +{ + return dev->flags & (1 << USB_DEV_FLAG_IS_SCSI_STORAGE); +} + /* quirks.c */ =20 /* In bulk endpoints are streaming data sources (iow behave like isoc eps)= */ diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4dd90b75cc52..f83a081af0f1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3106,7 +3106,7 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p,= BusState *bus, */ if (strcmp("usb-host", qdev_fw_name(dev)) =3D=3D 0) { USBDevice *usbdev =3D CAST(USBDevice, dev, TYPE_USB_DEVICE); - if (usb_host_dev_is_scsi_storage(usbdev)) { + if (usb_device_is_scsi_storage(usbdev)) { return g_strdup_printf("storage@%s/disk", usbdev->port->path); } } diff --git a/hw/usb/dev-storage-bot.c b/hw/usb/dev-storage-bot.c index 6aad026d1133..68ebaca10c66 100644 --- a/hw/usb/dev-storage-bot.c +++ b/hw/usb/dev-storage-bot.c @@ -32,6 +32,7 @@ static void usb_msd_bot_realize(USBDevice *dev, Error **e= rrp) =20 usb_desc_create_serial(dev); usb_desc_init(dev); + dev->flags |=3D (1 << USB_DEV_FLAG_IS_SCSI_STORAGE); if (d->hotplugged) { s->dev.auto_attach =3D 0; } diff --git a/hw/usb/dev-storage-classic.c b/hw/usb/dev-storage-classic.c index 00cb34b22f02..3d017a4e6791 100644 --- a/hw/usb/dev-storage-classic.c +++ b/hw/usb/dev-storage-classic.c @@ -64,6 +64,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error= **errp) =20 usb_desc_create_serial(dev); usb_desc_init(dev); + dev->flags |=3D (1 << USB_DEV_FLAG_IS_SCSI_STORAGE); scsi_bus_new(&s->bus, sizeof(s->bus), DEVICE(dev), &usb_msd_scsi_info_storage, NULL); scsi_dev =3D scsi_bus_legacy_add_drive(&s->bus, blk, 0, !!s->removable, diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index d2bd85d3f6bb..263056231c79 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -926,6 +926,7 @@ static void usb_uas_realize(USBDevice *dev, Error **err= p) QTAILQ_INIT(&uas->requests); uas->status_bh =3D qemu_bh_new(usb_uas_send_status_bh, uas); =20 + dev->flags |=3D (1 << USB_DEV_FLAG_IS_SCSI_STORAGE); scsi_bus_new(&uas->bus, sizeof(uas->bus), DEVICE(dev), &usb_uas_scsi_info, NULL); } diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 2518306f527f..e6d21aa8e1d3 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -770,6 +770,13 @@ static void usb_host_speed_compat(USBHostDevice *s) for (i =3D 0; i < conf->bNumInterfaces; i++) { for (a =3D 0; a < conf->interface[i].num_altsetting; a++) { intf =3D &conf->interface[i].altsetting[a]; + + if (intf->bInterfaceClass =3D=3D LIBUSB_CLASS_MASS_STORAGE= && + intf->bInterfaceSubClass =3D=3D 6) { /* SCSI */ + udev->flags |=3D (1 << USB_DEV_FLAG_IS_SCSI_STORAGE); + break; + } + for (e =3D 0; e < intf->bNumEndpoints; e++) { endp =3D &intf->endpoint[e]; type =3D endp->bmAttributes & 0x3; @@ -1893,35 +1900,6 @@ static void usb_host_auto_check(void *unused) timer_mod(usb_auto_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 200= 0); } =20 -/** - * Check whether USB host device has a USB mass storage SCSI interface - */ -bool usb_host_dev_is_scsi_storage(USBDevice *ud) -{ - USBHostDevice *uhd =3D USB_HOST_DEVICE(ud); - struct libusb_config_descriptor *conf; - const struct libusb_interface_descriptor *intf; - bool is_scsi_storage =3D false; - int i; - - if (!uhd || libusb_get_active_config_descriptor(uhd->dev, &conf) !=3D = 0) { - return false; - } - - for (i =3D 0; i < conf->bNumInterfaces; i++) { - intf =3D &conf->interface[i].altsetting[ud->altsetting[i]]; - if (intf->bInterfaceClass =3D=3D LIBUSB_CLASS_MASS_STORAGE && - intf->bInterfaceSubClass =3D=3D 6) { /* 6 mean= s SCSI */ - is_scsi_storage =3D true; - break; - } - } - - libusb_free_config_descriptor(conf); - - return is_scsi_storage; -} - void hmp_info_usbhost(Monitor *mon, const QDict *qdict) { libusb_device **devs =3D NULL; diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c index 80809ceba542..bbe69baa390f 100644 --- a/hw/usb/host-stub.c +++ b/hw/usb/host-stub.c @@ -38,8 +38,3 @@ void hmp_info_usbhost(Monitor *mon, const QDict *qdict) { monitor_printf(mon, "USB host devices not supported\n"); } - -bool usb_host_dev_is_scsi_storage(USBDevice *ud) -{ - return false; -} --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624533462480139.65332183731152; Thu, 24 Jun 2021 04:17:42 -0700 (PDT) Received: from localhost ([::1]:56478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwNMb-0006VH-5C for importer@patchew.org; Thu, 24 Jun 2021 07:17:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMol-0008El-Az for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoh-00013l-8J for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:43 -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-169-XDN7YoiNOyO14H__a76YSQ-1; Thu, 24 Jun 2021 06:42:37 -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 5B110106B7DE; Thu, 24 Jun 2021 10:42:35 +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 DE78C60E3A; Thu, 24 Jun 2021 10:42:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9E2531803556; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531358; 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=QiurdwY7zx/Ww1rbDD4KkyNSNb9+u2YvZzq+hk9TBso=; b=dhRffWG/zeyuNzfMwjpW4B9TszNg1H7lqe1r6tYvhWpnKMAdEl0FEKhC3pcNxRJTi/h7sx jM7QoxQ21Ks8R8sJRY/95BjZv+oL+iKuUw0sawhSBbP1ZgylrE6vtS/cICQozCON9ixY4z 8q4w0/YeWwLrky5BpFqc3ghplmtiIQ4= X-MC-Unique: XDN7YoiNOyO14H__a76YSQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 32/34] monitor/usb: register 'info usbhost' dynamically Date: Thu, 24 Jun 2021 12:38:34 +0200 Message-Id: <20210624103836.2382472-33-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 Reviewed-by: Jose R. Ziviani --- hw/usb/host-libusb.c | 1 + hw/usb/host-stub.c | 40 ---------------------------------------- hmp-commands-info.hx | 1 - hw/usb/meson.build | 4 +--- 4 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 hw/usb/host-stub.c diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index e6d21aa8e1d3..2b7f87872ce3 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1781,6 +1781,7 @@ static TypeInfo usb_host_dev_info =3D { static void usb_host_register_types(void) { type_register_static(&usb_host_dev_info); + monitor_register_hmp("usbhost", true, hmp_info_usbhost); } =20 type_init(usb_host_register_types) diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c deleted file mode 100644 index bbe69baa390f..000000000000 --- a/hw/usb/host-stub.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Stub host USB redirector - * - * Copyright (c) 2005 Fabrice Bellard - * - * Copyright (c) 2008 Max Krasnyansky - * Support for host device auto connect & disconnect - * Major rewrite to support fully async operation - * - * Copyright 2008 TJ - * Added flexible support for /dev/bus/usb /sys/bus/usb/devices in ad= dition - * to the legacy /proc/bus/usb USB device discovery and handling - * - * Permission is hereby granted, free of charge, to any person obtaining a= copy - * of this software and associated documentation files (the "Software"), t= o deal - * in the Software without restriction, including without limitation the r= ights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included= in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN - * THE SOFTWARE. - */ - -#include "qemu/osdep.h" -#include "hw/usb.h" -#include "monitor/monitor.h" - -void hmp_info_usbhost(Monitor *mon, const QDict *qdict) -{ - monitor_printf(mon, "USB host devices not supported\n"); -} diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index fb59c27200cb..ce42aef47acb 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -368,7 +368,6 @@ ERST .args_type =3D "", .params =3D "", .help =3D "show host USB devices", - .cmd =3D hmp_info_usbhost, }, =20 SRST diff --git a/hw/usb/meson.build b/hw/usb/meson.build index f357270d0b6b..3d8f2ae99302 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -73,9 +73,7 @@ endif =20 # usb pass-through softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_USB_LIBUSB', libusb], - if_true: files('host-libusb.c'), - if_false: files('host-stub.c')) -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('host-stub.c')) + if_true: files('host-libusb.c')) =20 softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true: files(= 'xen-usb.c')) =20 --=20 2.31.1 From nobody Sun May 19 23:20:53 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 1624532851071575.0283598446658; Thu, 24 Jun 2021 04:07:31 -0700 (PDT) Received: from localhost ([::1]:54448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwNCk-00028g-8w for importer@patchew.org; Thu, 24 Jun 2021 07:07:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoj-00088z-OX for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMog-00012t-CR for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:41 -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-558-dY5y8yF9OVutSjd_G7eAVw-1; Thu, 24 Jun 2021 06:42:36 -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 34E02362FC; Thu, 24 Jun 2021 10:42:35 +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 DB5CB60CCC; Thu, 24 Jun 2021 10:42:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AA9F71803557; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531357; 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=jNR7OSKPvAYdZ4eI0t2VIsh0jMrYUPKjJStHwBoBnB0=; b=JXtLHcHXZCm5Gq14EE8fUWlf3OYP+QBtFJrpPI135UcLlJkeS0PINB/1gd73hlrLtLKYAD DkVxlTCDaqfCSKiYnnpDfqWoj2mTtY7Aa70lykbSOETGwsBFOqQPAC6Q4jXZ2H+bw1L6HS Js8r3M/Qc6k/3z9tm/20CGKDOXNS6SU= X-MC-Unique: dY5y8yF9OVutSjd_G7eAVw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 33/34] usb: build usb-host as module Date: Thu, 24 Jun 2021 12:38:35 +0200 Message-Id: <20210624103836.2382472-34-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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" Drop one more shared library dependency (libusb) from core qemu. Signed-off-by: Gerd Hoffmann Reviewed-by: Jose R. Ziviani --- hw/usb/host-libusb.c | 1 + hw/usb/meson.build | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 2b7f87872ce3..c0f314462aaf 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1777,6 +1777,7 @@ static TypeInfo usb_host_dev_info =3D { .class_init =3D usb_host_class_initfn, .instance_init =3D usb_host_instance_init, }; +module_obj(TYPE_USB_HOST_DEVICE); =20 static void usb_host_register_types(void) { diff --git a/hw/usb/meson.build b/hw/usb/meson.build index 3d8f2ae99302..0a6029ec9797 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -72,8 +72,12 @@ if config_host.has_key('CONFIG_USB_REDIR') endif =20 # usb pass-through -softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_USB_LIBUSB', libusb], - if_true: files('host-libusb.c')) +if config_host.has_key('CONFIG_USB_LIBUSB') + usbhost_ss =3D ss.source_set() + usbhost_ss.add(when: ['CONFIG_USB', libusb], + if_true: files('host-libusb.c')) + hw_usb_modules +=3D {'host': usbhost_ss} +endif =20 softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true: files(= 'xen-usb.c')) =20 --=20 2.31.1 From nobody Sun May 19 23:20:53 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 162453221442594.24981921216272; Thu, 24 Jun 2021 03:56:54 -0700 (PDT) Received: from localhost ([::1]:53998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwN2T-0007SY-4z for importer@patchew.org; Thu, 24 Jun 2021 06:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMoy-0000WS-GO for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwMov-0001Hk-Pk for qemu-devel@nongnu.org; Thu, 24 Jun 2021 06:42: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-48-iqMkjY5BPV2BHrmSzkAsUA-1; Thu, 24 Jun 2021 06:42:52 -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 62D881934100; Thu, 24 Jun 2021 10:42: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 BB3ED26E41; Thu, 24 Jun 2021 10:42:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BBAC61803558; Thu, 24 Jun 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624531373; 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=WB51l16ZFueZ1BfkdXRpdWS9y+r9iZDq7y7U9eocncg=; b=GRWQiXAvKayKhwoI0OEXfICT8DI7kw5etO36IqnrpA/MdBZZGG+QLzvGXI6kuGjrBcNgeG J3q21GhyAXoWrulK78KTettusoZe0xARIxoIfubZcMsUAMGBGORbWR/DFB3STR2yvJUVey FZgCBEi03rhjcaEDobel+oiWhIBLOi0= X-MC-Unique: iqMkjY5BPV2BHrmSzkAsUA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 34/34] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically Date: Thu, 24 Jun 2021 12:38:36 +0200 Message-Id: <20210624103836.2382472-35-kraxel@redhat.com> In-Reply-To: <20210624103836.2382472-1-kraxel@redhat.com> References: <20210624103836.2382472-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, 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: "Michael S. Tsirkin" , Gerd Hoffmann , Samuel Thibault , qemu-block@nongnu.org, David Hildenbrand , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Peter Lieven , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, Ronnie Sahlberg , Cleber Rosa , David Gibson , Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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 more little step towards modular tcg ... Signed-off-by: Gerd Hoffmann Acked-by: Dr. David Alan Gilbert Reviewed-by: Jose R. Ziviani --- accel/tcg/hmp.c | 29 +++++++++++++++++++++++++++++ monitor/misc.c | 18 ------------------ accel/tcg/meson.build | 1 + hmp-commands-info.hx | 2 -- 4 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 accel/tcg/hmp.c diff --git a/accel/tcg/hmp.c b/accel/tcg/hmp.c new file mode 100644 index 000000000000..a6e72fdb3ed6 --- /dev/null +++ b/accel/tcg/hmp.c @@ -0,0 +1,29 @@ +#include "qemu/osdep.h" +#include "qemu/error-report.h" +#include "exec/exec-all.h" +#include "monitor/monitor.h" +#include "sysemu/tcg.h" + +static void hmp_info_jit(Monitor *mon, const QDict *qdict) +{ + if (!tcg_enabled()) { + error_report("JIT information is only available with accel=3Dtcg"); + return; + } + + dump_exec_info(); + dump_drift_info(); +} + +static void hmp_info_opcount(Monitor *mon, const QDict *qdict) +{ + dump_opcount_info(); +} + +static void hmp_tcg_register(void) +{ + monitor_register_hmp("jit", true, hmp_info_jit); + monitor_register_hmp("opcount", true, hmp_info_opcount); +} + +type_init(hmp_tcg_register); diff --git a/monitor/misc.c b/monitor/misc.c index ad476c6e51ea..b28874d6dc59 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -320,24 +320,6 @@ static void hmp_info_registers(Monitor *mon, const QDi= ct *qdict) } } =20 -#ifdef CONFIG_TCG -static void hmp_info_jit(Monitor *mon, const QDict *qdict) -{ - if (!tcg_enabled()) { - error_report("JIT information is only available with accel=3Dtcg"); - return; - } - - dump_exec_info(); - dump_drift_info(); -} - -static void hmp_info_opcount(Monitor *mon, const QDict *qdict) -{ - dump_opcount_info(); -} -#endif - static void hmp_info_sync_profile(Monitor *mon, const QDict *qdict) { int64_t max =3D qdict_get_try_int(qdict, "max", 10); diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 0ae9180282e3..137a1a44cc0a 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -15,6 +15,7 @@ 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', + 'hmp.c', )) =20 tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files( diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index ce42aef47acb..27206ac049df 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -274,7 +274,6 @@ ERST .args_type =3D "", .params =3D "", .help =3D "show dynamic compiler info", - .cmd =3D hmp_info_jit, }, #endif =20 @@ -289,7 +288,6 @@ ERST .args_type =3D "", .params =3D "", .help =3D "show dynamic compiler opcode counters", - .cmd =3D hmp_info_opcount, }, #endif =20 --=20 2.31.1