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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 36050C433EF for ; Mon, 20 Sep 2021 19:06:03 +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 C79C060F6B for ; Mon, 20 Sep 2021 19:06:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C79C060F6B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:56652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSOc5-0007IT-0V for qemu-devel@archiver.kernel.org; Mon, 20 Sep 2021 15:06:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSOZj-0005RN-1o for qemu-devel@nongnu.org; Mon, 20 Sep 2021 15:03:36 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:35788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSOZg-0002zt-BZ for qemu-devel@nongnu.org; Mon, 20 Sep 2021 15:03:34 -0400 Received: by mail-ed1-x52e.google.com with SMTP id v5so64031990edc.2 for ; Mon, 20 Sep 2021 12:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1DWHDoOZ/pbRf8Jo1bNxhSninS64+4peeNbndFDqnEo=; b=asZ0q51fLsEarSICw3dcqvjB4gYmDVwjyVAIhzDMBiiQq2wEj50K0sOvuK/fwvIRhk sYjNC/nwBKCIFQNKWZv19TcTHQvjrKyINMVY/VNx1+/AxqYR0ixoiZra0A37mYDXom+T 4NwAYF7rsPZv1TJPEXgVLOTvfGKpbgmBNRWDiXM8o+ABVIBI+z8z7hme/0NGXOrxUJeo Tg5CWjkAk/wldrjRIF3qCSTG3t+bBlFmtDiJOBMkiDucFNO1ZOWPolxNAqdwOnMRolCw f8Y1iEMm+vZ0dFHylG+52S24U6lTr6dor64njw60fAvx+YYbxVJZAA3kH7lFyRHE5a2S bqug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1DWHDoOZ/pbRf8Jo1bNxhSninS64+4peeNbndFDqnEo=; b=toQEa9qbDANnFEhn0Cg/eMPl7wB7vhVhwu/RArs2uhTgMxh0RKPk0aD4kuoTce4m90 xboCgVoEZXQmAO4wfkDW7d6Sf/AXCkCUVto+DjdAUvt84UeezQdbEIE4WmQVbk2pIPau zMbZQd/JncJ/3oLrVXozy6QzXS8U4XD2nrc06w2t6my+oj8dI7fvCLj14fx5nXFNtZG+ PYxU6JOA9/TlG00Mp4oEHWikapxqEyOzAh6pO9D0nwTuSTTMQ3kHtU3n3WtjnNj1V5XA aXVxhSkR2SicJhZAoecOVGHlRyznd1/BfFMJUxtfNoiObOBxcX/bG0aPHJVRVCRfiZNl dzWQ== X-Gm-Message-State: AOAM531o4FOssNQFRV+qx0OhFK3NZlP/V+POVeNLpAUTJWK0tukHUxfZ maGEqwOt8P73BQ972u9aK/oE2mFFEds= X-Google-Smtp-Source: ABdhPJzFRM9VHemnshKsXOK1eSKehPMYAiceHclEAWwNsREu6z1YBeGq6M+9OPviQ5BW1TDwdJTQAQ== X-Received: by 2002:a50:d713:: with SMTP id t19mr30742714edi.2.1632164609923; Mon, 20 Sep 2021 12:03:29 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.googlemail.com with ESMTPSA id b3sm6425892ejb.7.2021.09.20.12.03.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Sep 2021 12:03:29 -0700 (PDT) Subject: Re: [PATCH 1/2] meson: introduce modules_arch To: "Jose R. Ziviani" , Gerd Hoffmann References: <20210917012904.26544-1-jziviani@suse.de> <20210917012904.26544-2-jziviani@suse.de> <20210917071404.efhv3tlnad2ezz3e@sirius.home.kraxel.org> <20210920051532.tzanl2asdqzuxlzn@sirius.home.kraxel.org> From: Paolo Bonzini Message-ID: <05b09438-43ef-bd40-2b0a-2fdebf0425bd@redhat.com> Date: Mon, 20 Sep 2021 21:03:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 20/09/21 15:02, Jose R. Ziviani wrote: > But, in anyway, I'll still need to store the target architecture that > can use such core module, like I did here in this patch. Otherwise, > if I compile different targets at the same time, I'll end up with the > same problem of targets trying to load wrong modules. > > I thought of using qom, but I think it will pollute module.c. Alternatively, you could C-ify the contents of config-devices.mak, and embed them in the per-arch modinfo-*.c; and record CONFIG_* symbols for each module (e.g. '{ "CONFIG_QXL", "hw-display-qxl" }' from a 'module_config("CONFIG_QXL")' line in the global modinfo.c file. Then before loading a module you do a binary search on the per-arch config-devices array. I hope the above is readable. :) Paolo