From nobody Sat May 18 06:50:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601624193; cv=none; d=zohomail.com; s=zohoarc; b=TzTJ13dlFr6oKtcq9HJt4Dk5xqUugy67tkSXjmaT5Ae5znSaeZ7R1pPgzwFSxrr1HGScfqVmdZlBMvvq1tMISoUYn5LKXQxp7f1kF472crsCitGe/8+2neI5m5jk848BuVCLpegGzoV6igqKUkxVx/ypPRC3H8WwSNLntMVH6LM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601624193; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=qGIdYV7MY+96XYcLdL6EIBAcSLF+M4Q8s5/QnOUrGIA=; b=PFsmPkMUIuGBM1h6Kn5l29K9pVcgunn9VLjQYO8ebQTIFF0xgKbC8wZCRlWSUxYwWOEbFJRQrw/kkwh/41lzbhoAtmyDSDKsh7f74G34vQvWH7HygqlX4VNlSeybSWk/jHLEvEHlJsBXofWI/y/APz2zBnygAVi1IBM98xdxatI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601624193182154.1663419005681; Fri, 2 Oct 2020 00:36:33 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-27-oQAqM_jRO_igS2WGl57kcQ-1; Fri, 02 Oct 2020 03:36:30 -0400 Received: by mail-wr1-f72.google.com with SMTP id l9so225348wrq.20 for ; Fri, 02 Oct 2020 00:36:30 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id d9sm722367wmb.30.2020.10.02.00.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 00:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601624192; 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=qGIdYV7MY+96XYcLdL6EIBAcSLF+M4Q8s5/QnOUrGIA=; b=F7ghXEfOksAWgkAOQzWdvYfR91jtTYPJZM9GHl2lTvej+XXj2yLiISTxfEN7LhQZMd9MWo M3ppUEufIGDVMi8KCqzlx3jzkofwlB8fZrzRJoQlpGtalLwZ2K2aFMosolBlW097Y30vQn XEg/XZqLJn0F8j6FvBj3hQG/4O1ExjA= X-MC-Unique: oQAqM_jRO_igS2WGl57kcQ-1 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=qGIdYV7MY+96XYcLdL6EIBAcSLF+M4Q8s5/QnOUrGIA=; b=DqVPYm2AQC335nHiEDS/K5DoaB3YZsXCESCupbra4dVpJ1bQFoSNwyeDa0h/U1ZKUz w1IZGcGYMVD4K9Dd8lmlXUCeCupaygnu74t2ZaszYs/i59tiFkxDknbUf8Zk+Fz1w3N4 VpyjH5pVRn8mHTP2zCdBRqVrroNc2phSyw6ZEIn8JzvXC9v4dioDkCpxQfo4juhqwf07 4zS4lvATpTcFfUX6eBXCnhfkYCtmLnGYxngPwogx+oeTtAtxgtXTRSMlCw4+EzQnW6vi VfUKHBO0YS078Lj13maZTJtvI340lKGyUTJ83yOhH2yXKNm/E8no9CEyQfgcWpT9yVYC V92w== X-Gm-Message-State: AOAM531DW4Gn7BiHpokbeDCn9vsFm68gM3JjFP3qO4ySXzFdXtaBOKr6 I4uAnXBGQlVopWRgd4QcUW7LKK0YmHf8sMruqCeeXxFRuA1wMmxQA6/jghUeQTF8BRJyaIbRXNE /uRVz5wWArPq3aA== X-Received: by 2002:a5d:5306:: with SMTP id e6mr1475603wrv.156.1601624189326; Fri, 02 Oct 2020 00:36:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyyIIpVim4lLi37ar85jV86Yzn8xaO1ecsHVFOH1go+IO4UrZLVjI/R1WqlpBxr40olppc4w== X-Received: by 2002:a5d:5306:: with SMTP id e6mr1475577wrv.156.1601624189112; Fri, 02 Oct 2020 00:36:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Markus Armbruster , Paolo Bonzini , Eduardo Habkost , Michael Roth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 1/1] qapi: Restrict code generated for user-mode Date: Fri, 2 Oct 2020 09:36:21 +0200 Message-Id: <20201002073621.1653924-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002073621.1653924-1-philmd@redhat.com> References: <20201002073621.1653924-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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 4 groups: - always used - only used by system-mode - not used by user-mode - not used by tools Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Paolo Bonzini --- qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/qapi/meson.build b/qapi/meson.build index 7c4a89a882..10cf01ef65 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -14,39 +14,60 @@ util_ss.add(files( )) =20 qapi_all_modules =3D [ + 'common', + 'introspect', + 'misc', +] + +qapi_system_modules =3D [ 'acpi', 'audio', + 'dump', + 'machine-target', + 'migration', + 'misc-target', + 'net', + 'pci', + 'rdma', + 'rocker', + 'tpm', + 'trace', +] + +qapi_system_or_user_modules =3D [ + 'machine', # X86CPUFeatureWordInfo + 'qdev', +] + +qapi_system_or_tools_modules =3D [ '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', ] =20 +if have_system + qapi_all_modules +=3D qapi_system_modules +endif + +if have_system or have_user + qapi_all_modules +=3D qapi_system_or_user_modules +endif + +if have_system or have_tools + qapi_all_modules +=3D qapi_system_or_tools_modules +endif + qapi_storage_daemon_modules =3D [ 'block-core', 'char', --=20 2.26.2