From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D91EC48BDF for ; Thu, 24 Jun 2021 11:13:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC3AC611CE for ; Thu, 24 Jun 2021 11:13:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC3AC611CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwNIH-0004PL-U4 for qemu-devel@archiver.kernel.org; Thu, 24 Jun 2021 07:13:13 -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 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= 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 X-MC-Unique: jYwEwTAlOSGiVHYSeG-fSQ-1 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) 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: 8bit Content-Type: text/plain; charset="US-ASCII" 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Build tcg accel ops as module. Which is only a small fraction of tcg. Also only x86 for now. Signed-off-by: Gerd Hoffmann --- accel/tcg/meson.build | 5 ++++- meson.build | 14 +++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 1236ac7b910b..0ae9180282e3 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -15,8 +15,11 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) 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 +modular_tcg = ['i386-softmmu', 'x86_64-softmmu'] + edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ] install_edk2_blobs = false if get_option('install_blobs') @@ -1311,6 +1313,11 @@ foreach target : target_dirs elif sym == 'CONFIG_XEN' and have_xen_pci_passthrough config_target += { 'CONFIG_XEN_PCI_PASSTHROUGH': 'y' } endif + if target in modular_tcg + config_target += { 'CONFIG_TCG_MODULAR': 'y' } + else + config_target += { 'CONFIG_TCG_BUILTIN': 'y' } + endif accel_kconfig += [ sym + '=y' ] endif endforeach @@ -1782,6 +1789,7 @@ util_ss = ss.source_set() # accel modules qtest_module_ss = ss.source_set() +tcg_module_ss = ss.source_set() modules = {} target_modules = {} @@ -2022,7 +2030,11 @@ subdir('tests/qtest/libqos') subdir('tests/qtest/fuzz') # accel modules -target_modules += { 'accel' : { 'qtest': qtest_module_ss }} +tcg_real_module_ss = 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 += { 'accel' : { 'qtest': qtest_module_ss, + 'tcg': tcg_real_module_ss }} ######################## # Library dependencies # -- 2.31.1