From nobody Thu Mar 28 22:11:35 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623321597; cv=none; d=zohomail.com; s=zohoarc; b=Nj0jvvafde99FFzqrCZglL6QjEl+iEdOLSHHmKGJv5yBQ+pATrRrQpDz/HsBPXsO5FF8wGHRje8r5hnBtMHOl5UFyZS5b1yvqa4u2wWUrt7CA+1vyxhEAYfUiQZH59yX6Owl+uxYaheYUGiKPSNd/0k/SsmEWaO5C7Gyp7/DOsc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623321597; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=S8xHdI0iBHhE8SWS4ss8bjjdkfXV4HozSbySoxC7m+s=; b=SDrnmiSwZU1iQx39wp75ikHvAb4hzV0i4V65tOg+ztGTbOiVq8q0i4lLXthXdG09zLXv9dg2UhnOhvqp7hHLTCVMH/rRnwOXOidJrL5/PElITqhpDwDRIIAVknzfExgYu5swvlwV26Rf96g5NfVVnllFUN/sgH6/C9wwhSyb6Kk= ARC-Authentication-Results: i=1; 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+importer2=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623321597806595.394280486384; Thu, 10 Jun 2021 03:39:57 -0700 (PDT) Received: from localhost ([::1]:48618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrI6O-00055R-Ll for importer2@patchew.org; Thu, 10 Jun 2021 06:39:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjO-0006OR-Rr for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjN-00018w-5x for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16: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-218-ClO598BrNPm_IiFDBDvezA-1; Thu, 10 Jun 2021 06:16:05 -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 1140C100C618; Thu, 10 Jun 2021 10:16:04 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-69.ams2.redhat.com [10.36.113.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7D7F1037E81; Thu, 10 Jun 2021 10:15:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 160C618007A3; Thu, 10 Jun 2021 12:15:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623320168; 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=S8xHdI0iBHhE8SWS4ss8bjjdkfXV4HozSbySoxC7m+s=; b=AMR02+3FyrLek97q1fnETlak7Hfy/qVxeO9klHqJcvBthWG2WoNICSD+nWzkTqY6p/poGM 7SlIrxxFSRTp1WJLIiP7uyk9s+7fl3/deMXlFPoVWSKxL197deRnUAzToQrv5E8zcx8AbJ yoXYjaVJ87kiH1MALC327a/VnjrlFYE= X-MC-Unique: ClO598BrNPm_IiFDBDvezA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 1/4] modules: factor out arch check Date: Thu, 10 Jun 2021 12:15:50 +0200 Message-Id: <20210610101553.943689-2-kraxel@redhat.com> In-Reply-To: <20210610101553.943689-1-kraxel@redhat.com> References: <20210610101553.943689-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.199, 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" , Christian Schoenebeck , Greg Kurz , cfontana@suse.de, jose.ziviani@suse.com, pbonzini@redhat.com, Gerd Hoffmann Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Move check to helper function for easy reuse. No functional change. Signed-off-by: Gerd Hoffmann --- util/module.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/util/module.c b/util/module.c index 4f98cc74ae37..860c257fc56e 100644 --- a/util/module.c +++ b/util/module.c @@ -129,6 +129,21 @@ void module_allow_arch(const char *arch) module_arch =3D arch; } =20 +static bool module_check_arch(ModuleInfo *info) +{ + if (info->has_arch) { + if (!module_arch) { + /* no arch set -> ignore all */ + return false; + } + if (strcmp(module_arch, info->arch) !=3D 0) { + /* mismatch */ + return false; + } + } + return true; +} + static void module_load_path_init(void) { const char *search_dir; @@ -301,12 +316,9 @@ bool module_load_one(const char *prefix, const char *l= ib_name, bool mayfail) module_load_modinfo(); =20 for (modlist =3D modinfo->list; modlist !=3D NULL; modlist =3D modlist= ->next) { - if (modlist->value->has_arch) { - if (strcmp(modlist->value->name, module_name) =3D=3D 0) { - if (!module_arch || - strcmp(modlist->value->arch, module_arch) !=3D 0) { - return false; - } + if (strcmp(modlist->value->name, module_name) =3D=3D 0) { + if (!module_check_arch(modlist->value)) { + return false; } } if (modlist->value->has_deps) { --=20 2.31.1 From nobody Thu Mar 28 22:11:35 2024 Delivered-To: importer2@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+importer2=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 1623321720506935.8443178229456; Thu, 10 Jun 2021 03:42:00 -0700 (PDT) Received: from localhost ([::1]:53104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrI8N-00087l-GW for importer2@patchew.org; Thu, 10 Jun 2021 06:41:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjY-0006ly-Mb for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjX-0001Fo-29 for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:20 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-550-TVcnvtrFP1mvkhxtnaHtpQ-1; Thu, 10 Jun 2021 06:16:15 -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 03095100CF69; Thu, 10 Jun 2021 10:16:14 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-69.ams2.redhat.com [10.36.113.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A634260E3A; Thu, 10 Jun 2021 10:16:05 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2076A1800937; Thu, 10 Jun 2021 12:15:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623320178; 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=cfgtaH/HM6+H83R0TQ/toxuT27gEHyThvA+yYQ5q8jc=; b=jAgGSJUHyBzNjdFMvHpgPMjycuPnz2bUHY1saQnO1oVptOo0IR6Hw/0lv+xo0J2ieN/Mm1 BGhyLmSvcMeaedKSGk7z1sF+gpwGsY+DfC9mKdQnA49aO8YKY4iSrwYL0ybehgWG9IVPmg J7QAxkSOPHha1hT0nKABYbXASTRPw1c= X-MC-Unique: TVcnvtrFP1mvkhxtnaHtpQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 2/4] modules: check arch on qom lookup Date: Thu, 10 Jun 2021 12:15:51 +0200 Message-Id: <20210610101553.943689-3-kraxel@redhat.com> In-Reply-To: <20210610101553.943689-1-kraxel@redhat.com> References: <20210610101553.943689-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.199, 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" , Christian Schoenebeck , Greg Kurz , cfontana@suse.de, jose.ziviani@suse.com, pbonzini@redhat.com, Gerd Hoffmann Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" With target-specific modules we can have multiple modules implementing the same object. Therefore we have to check the target arch on lookup to find the correct module. Signed-off-by: Gerd Hoffmann --- util/module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/module.c b/util/module.c index 860c257fc56e..35ba3f17cc5f 100644 --- a/util/module.c +++ b/util/module.c @@ -380,6 +380,9 @@ void module_load_qom_one(const char *type) if (!modlist->value->has_objs) { continue; } + if (!module_check_arch(modlist->value)) { + continue; + } for (sl =3D modlist->value->objs; sl !=3D NULL; sl =3D sl->next) { if (strcmp(type, sl->value) =3D=3D 0) { module_load_one("", modlist->value->name, false); @@ -403,6 +406,9 @@ void module_load_qom_all(void) if (!modlist->value->has_objs) { continue; } + if (!module_check_arch(modlist->value)) { + continue; + } module_load_one("", modlist->value->name, false); } module_loaded_qom_all =3D true; --=20 2.31.1 From nobody Thu Mar 28 22:11:35 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623320766; cv=none; d=zohomail.com; s=zohoarc; b=NjtSfmAgwF8VroPtp4uJ1z3TY15v6VH2J0GuJjk2PN9snp0/UcnxmYx3rUlKHz1yl2g2iAlio9Jz2PCw+CGUaZJ8hnAKJ67Okcje9JV9maxEoXq9MC1V9egvcfVsBpE+DaKoGJQUay6ru8Sk1Uc69inu6gQStaXA9a3igFPsCzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623320766; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RYeo3QXoPV73JdQivHo9olDHnBSgCEcjDl7hZRRp+Tw=; b=AYD8WdrVDEbTC6Zrk3D1nk/cuRnNydGYvc7svEUIuRJ2zDt8KJZwpykmFypi5sCur7wV8BA8hb9VyGCRT+7HaitYYRBAU8QnFIqJvr9GV+BXU3HICxscANtkUaXXslcnxvp0BIGhyzPBBdfzNbR5nli7DeLzTbA4wi4ODw5wq6E= ARC-Authentication-Results: i=1; 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+importer2=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623320766641979.9799476629039; Thu, 10 Jun 2021 03:26:06 -0700 (PDT) Received: from localhost ([::1]:58776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrHsz-0007In-IV for importer2@patchew.org; Thu, 10 Jun 2021 06:26:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjf-00070i-2b for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjc-0001IV-QQ for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:26 -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-208-NGbBOvdlNtO8SCUQ5R_57A-1; Thu, 10 Jun 2021 06:16:22 -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 8A43118D6A25; Thu, 10 Jun 2021 10:16:21 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-69.ams2.redhat.com [10.36.113.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C8226091A; Thu, 10 Jun 2021 10:16:12 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2B2AF180093F; Thu, 10 Jun 2021 12:15:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623320183; 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=RYeo3QXoPV73JdQivHo9olDHnBSgCEcjDl7hZRRp+Tw=; b=ICExy4WwVd/e5/iS6N+sYuviAZs3DfrsLKjIATD52koKHCX3mRtbvF6aqnIxkv4WPaoops wsTZ+1Glqdcbo90VgxeBldYwdPf0siZ2OF5OfYyv6XAcw7SxQjep0l+v3cunSQOMGJG2r3 Ocp9l5Z837Qdcc1V0FVeTn1xiP3hxS4= X-MC-Unique: NGbBOvdlNtO8SCUQ5R_57A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 3/4] modules: target-specific module build infrastructure Date: Thu, 10 Jun 2021 12:15:52 +0200 Message-Id: <20210610101553.943689-4-kraxel@redhat.com> In-Reply-To: <20210610101553.943689-1-kraxel@redhat.com> References: <20210610101553.943689-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.199, 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" , Christian Schoenebeck , Greg Kurz , cfontana@suse.de, jose.ziviani@suse.com, pbonzini@redhat.com, Gerd Hoffmann Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- meson.build | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/meson.build b/meson.build index 9823c5889140..a22c26850429 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 {} @@ -2052,6 +2053,31 @@ 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 + config_target =3D config_target_mak[target] + config_target +=3D config_host + target_inc =3D [include_directories('target' / config_target['TARG= ET_BASE_ARCH'])] + c_args =3D ['-DNEED_CPU_H', + '-DCONFIG_TARGET=3D"@0@-config-target.h"'.format(target), + '-DCONFIG_DEVICES=3D"@0@-config-devices.h"'.format(targe= t)] + target_module_ss =3D module_ss.apply(config_target, strict: false) + sl =3D static_library(target + '-' + d + '-' + m, + [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 + endforeach + else + specific_ss.add_all(module_ss) + endif + endforeach +endforeach + nm =3D find_program('nm') undefsym =3D find_program('scripts/undefsym.py') block_syms =3D custom_target('block.syms', output: 'block.syms', --=20 2.31.1 From nobody Thu Mar 28 22:11:35 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623321212; cv=none; d=zohomail.com; s=zohoarc; b=STRl/1F538PY/SWwBZ3nfbN4VEG3/C0YNts26uD36Rhvk94Usx4TCp7HycapSrGKfey9YcYCiGSBcGCetlXRA+U4F8GQiXjhFuCUVXfgtqaMkGl2f2ySsfHimcuYoAgr63+2ZMLGMxrXbVtVbNlLoWv3r+hA+ysfZFATtqm8KVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623321212; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=A4rQnla47qSsi4ecNnOBQG3ACoJi/wGvpg9dddASoak=; b=OD693Zo+CBrCfoBy+3uVlZ/ii6FTGuhS3C2n1VK1cM5bfAOF5QHfbvrF9en2LEbYdkssiXuK7mA6BrK62QM1m9lHxbOI0Lc7PZqBYFQkCnmwAmdMzfDcirP6otzqTPFvyCZLSyzQCF4Z6juJBD6VSzEMcYZXxudwU7EaTNbAnFg= ARC-Authentication-Results: i=1; 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+importer2=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623321212102307.3010290172226; Thu, 10 Jun 2021 03:33:32 -0700 (PDT) Received: from localhost ([::1]:53690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrI0A-0006Qh-RQ for importer2@patchew.org; Thu, 10 Jun 2021 06:33:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHji-00072s-Rs for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrHjd-0001JI-ET for qemu-devel@nongnu.org; Thu, 10 Jun 2021 06:16:30 -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-92jI3Tb2PPmQYO2_mjzWTQ-1; Thu, 10 Jun 2021 06:16:23 -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 30254100CF76; Thu, 10 Jun 2021 10:16:22 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-69.ams2.redhat.com [10.36.113.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E623660C04; Thu, 10 Jun 2021 10:16:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3843118009C4; Thu, 10 Jun 2021 12:15:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623320184; 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=A4rQnla47qSsi4ecNnOBQG3ACoJi/wGvpg9dddASoak=; b=F+Uvz8lv+pUt7Ci+5BbduVB1dDCLsB0FSJiK5vbOP/92FS6HDAn7nSaZXWMpSe8EDDrxmR 7FdDeiFgoMVsZ69APQZWsF3fkC2vorG9X6Xy07UQg1guMRKlcOpga34OFN+RYOQQOoTWNj RD5W1ScA84EcyU4zmAOIEItK8qeZE8E= X-MC-Unique: 92jI3Tb2PPmQYO2_mjzWTQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 4/4] modules: build virtio-9p modular Date: Thu, 10 Jun 2021 12:15:53 +0200 Message-Id: <20210610101553.943689-5-kraxel@redhat.com> In-Reply-To: <20210610101553.943689-1-kraxel@redhat.com> References: <20210610101553.943689-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.199, 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" , Christian Schoenebeck , Greg Kurz , cfontana@suse.de, jose.ziviani@suse.com, pbonzini@redhat.com, Gerd Hoffmann Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Simple target for testing =F0=9F=98=8A Signed-off-by: Gerd Hoffmann --- hw/9pfs/virtio-9p-device.c | 2 ++ hw/9pfs/meson.build | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 14371a78efd8..9a2df7b5126d 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -265,6 +265,8 @@ static const TypeInfo virtio_device_info =3D { .instance_size =3D sizeof(V9fsVirtioState), .class_init =3D virtio_9p_class_init, }; +module_obj(TYPE_VIRTIO_9P); +module_arch(TARGET_NAME); =20 static void virtio_9p_register_types(void) { diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build index 99be5d911968..584e9432ab46 100644 --- a/hw/9pfs/meson.build +++ b/hw/9pfs/meson.build @@ -1,3 +1,5 @@ +hw_9pfs_modules =3D {} + fs_ss =3D ss.source_set() fs_ss.add(files( '9p-local.c', @@ -17,4 +19,11 @@ fs_ss.add(files( fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c')) softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss) =20 -specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device= .c')) +if config_all_devices.has_key('CONFIG_VIRTIO_9P') + virtio_9p_ss =3D ss.source_set() + virtio_9p_ss.add(when: 'CONFIG_VIRTIO_9P', + if_true: files('virtio-9p-device.c')) + hw_9pfs_modules +=3D {'virtio-9p-device': virtio_9p_ss} +endif + +target_modules +=3D { 'hw-9pfs': hw_9pfs_modules } --=20 2.31.1