From patchwork Wed Sep 30 16:49:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1374558 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gu8CisHy; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4C1j6T4d3Vz9sSn for ; Thu, 1 Oct 2020 02:54:57 +1000 (AEST) Received: from localhost ([::1]:42980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNfNX-0002F4-BT for incoming@patchwork.ozlabs.org; Wed, 30 Sep 2020 12:54:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNfJi-0006jO-SG for qemu-devel@nongnu.org; Wed, 30 Sep 2020 12:50:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNfJg-0007Dr-CD for qemu-devel@nongnu.org; Wed, 30 Sep 2020 12:50:58 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601484655; 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=p5T4b3uR4sPUBIFjdhNd72M+5jlOJeIdLDswdJQ0sTY=; b=gu8CisHykX+emQxAml9sN63b2v25Fr0JzG5aGUS0AeQG/fWTovMhC4AefHYVCWKbcmwezA cNwvPchzVoQ/CZSaODQn53YU/HSLzf1xgzin30HvPDOVIEK8NUlHEaVXz2JbMmpU/squi2 t74oMfI5/U1OD+Sap9Pn23Tj3MwBZPc= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-378-dDUopM0_ODuZpEn5x4upUg-1; Wed, 30 Sep 2020 12:50:53 -0400 X-MC-Unique: dDUopM0_ODuZpEn5x4upUg-1 Received: by mail-wr1-f69.google.com with SMTP id a12so826066wrg.13 for ; Wed, 30 Sep 2020 09:50:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p5T4b3uR4sPUBIFjdhNd72M+5jlOJeIdLDswdJQ0sTY=; b=hJU6evC67B98vpAVog5Zqk1GnX3a9wwsDpIZUMjJf2z4wPpbAzD/1NdUbvp3/YGuIt kY/FWR0UYBvxUMyEcKpBDOKrAKycUsXBBNmOy4b+dK7ADG3yPR1yaY2T74UsYcVdT61h 3Yc+SDT4s2+aVX4dCYGdurqs03qbTFv2DMRDd6cYuRFDjLdq6fM1IRE6T2NvjfskRkdB HOZv2cu5/ETqbOkSQbkShkH624sXllIZoCkOlbdwFYsQFx3FRkQZdfOdGKIs/+rqCC6q l7cyN9f1ouaNkjIGewnFFQR9CpBMq/XRaYA253LChQd4hHJ68ERqm/dW8T7IreGE5z8T GCsQ== X-Gm-Message-State: AOAM532Yjl0iDB+7Ba3KAgkgdwDI8g+E74gOa4oPEUvhp9h+d2PO6tx0 sN2sXP4z9yW90aJrWylbMkCZSYKZL2857dULBulBLraLgNwO92zj1UxpdcIz3PWuZ6F3Z+QwqYH bbAHrVgVSm3qkhR8= X-Received: by 2002:adf:fd12:: with SMTP id e18mr4250015wrr.96.1601484651954; Wed, 30 Sep 2020 09:50:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuTX+OJeaabPNkTWh+q+FjuxodYFwPUOAG87v3IdLMLDqovciEEHHgoWcyYIPkOeVRu0X9fw== X-Received: by 2002:adf:fd12:: with SMTP id e18mr4249995wrr.96.1601484651786; Wed, 30 Sep 2020 09:50:51 -0700 (PDT) Received: from x1w.redhat.com (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id t4sm4250032wrr.26.2020.09.30.09.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 09:50:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Laurent Vivier Subject: [PATCH v3 11/11] qapi: Restrict code generated for user-mode Date: Wed, 30 Sep 2020 18:49:49 +0200 Message-Id: <20200930164949.1425294-12-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200930164949.1425294-1-philmd@redhat.com> References: <20200930164949.1425294-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/30 00:31:59 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.469, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Kevin Wolf , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Ronnie Sahlberg , qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Lieven , Michael Roth , Eduardo Habkost , Markus Armbruster , Richard Henderson , Paolo Bonzini , Max Reitz , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" A lot of QAPI generated code is never used by user-mode. Split out qapi_system_modules and qapi_system_or_tools_modules from the qapi_all_modules array. We now have 3 groups: - always used - use by system-mode or tools (usually by the block layer) - only used by system-mode Signed-off-by: Philippe Mathieu-Daudé --- Resetting due to Meson update: Reviewed-by: Richard Henderson --- qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/qapi/meson.build b/qapi/meson.build index 7c4a89a882..ba9677ba97 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -14,39 +14,60 @@ util_ss.add(files( )) qapi_all_modules = [ + 'common', + 'introspect', + 'misc', +] + +qapi_system_modules = [ 'acpi', 'audio', + 'dump', + 'machine-target', + 'machine', + 'migration', + 'misc-target', + 'net', + 'pci', + 'qdev', + 'rdma', + 'rocker', + 'tpm', + 'trace', +] + +# system or tools +qapi_block_modules = [ 'authz', 'block-core', 'block', 'char', - 'common', 'control', 'crypto', - 'dump', 'error', - 'introspect', 'job', - 'machine', - 'machine-target', - 'migration', - 'misc', - 'misc-target', - 'net', 'pragma', - 'qdev', - 'pci', 'qom', - 'rdma', - 'rocker', 'run-state', 'sockets', - 'tpm', - 'trace', 'transaction', 'ui', ] +if have_system + qapi_all_modules += qapi_system_modules +elif have_user + # Temporary kludge because X86CPUFeatureWordInfo is not + # restricted to system-mode. This should be removed (along + # with target/i386/feature-stub.c) once target/i386/cpu.c + # has been cleaned. + qapi_all_modules += ['machine-target'] +endif + +if have_block + qapi_all_modules += qapi_block_modules +endif + qapi_storage_daemon_modules = [ 'block-core', 'char',