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=0.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 42F02C07E95 for ; Fri, 16 Jul 2021 15:29:43 +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 DEBA461006 for ; Fri, 16 Jul 2021 15:29:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEBA461006 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4PmY-0000jd-4Z for qemu-devel@archiver.kernel.org; Fri, 16 Jul 2021 11:29:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4PaF-0003yg-Hq for qemu-devel@nongnu.org; Fri, 16 Jul 2021 11:16:59 -0400 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]:38902) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m4PaD-0005DB-KF for qemu-devel@nongnu.org; Fri, 16 Jul 2021 11:16:59 -0400 Received: by mail-oo1-xc2e.google.com with SMTP id 128-20020a4a11860000b029024b19a4d98eso2508298ooc.5 for ; Fri, 16 Jul 2021 08:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s61WvCnCaYmoIN9j+r8DOuHV2B9sXzdSLu+pvwp1ZAs=; b=N38ontKwkZ4Ec3epfogZRRQMWwRvi2Yc4JuxObrrgj8xynDHLuR4Q5OgzYEN2+1wIc RFPn7jt4ApUqu8gwzl7bpbWwAewsACfU5oz6I4fmOKLGcKB+AjZaas6sR5EGUiqkxsrr kQ1QEhdbxFcmJZDszC/Rb/FN4wNbAI07LCIHhk1pCzZc2X3/eaAIQBkgNsNzUstnSqRE vgavSBpUho8SXl5djHn5GPbNnZBfI9YHIQMm+EawTMSJ1daECyTRwFVr4qfNgzu6Vnh/ V7mk6OWDJxVzP4jHIFfwBCElya88XQfl8SWcpABq33AtwCaV86MNyw9Ndr//qXpnFCbj 9RJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s61WvCnCaYmoIN9j+r8DOuHV2B9sXzdSLu+pvwp1ZAs=; b=UMR4doHFyAkHEpF9UIvzZuCxAVxe4pJhUdTGY/lR4e7a9lRXpNp484upoqAlufUV5E 59C7+HhkLgIU+2y6VcY2d8yrchQ1Fe4qmspIwbFEBCt2THM+/I2vF0c6+qSgS0p3SQnw V3o02PwMf5L+eojky3PmhxLesTMbegyhEGzwPbD6ebTZ0gX+1ex7NMbouaSAfQGwMC3I GHAJp+GWAJ6xqXFrBCVntG8IBCqpySz8pSmxA6amMwqEjkEjx8UG637e6YdjWTKvcMTf JrfBcEKItv2YwIW9GyB7/3qUttCHvJBDYN0UPgoxdosnYIYLsrGJzax7+Msv4Wmqard2 HIwg== X-Gm-Message-State: AOAM532jeI+/DsXS9jZ+pU724laSK6pPVhn73CbgircUQnhSzZm8TH6p j8YzITWXTjJTNN1WNFQCNmB1b3hNHnv5HwWQgBk= X-Google-Smtp-Source: ABdhPJzisi/1myc3l8fAqeG6ILclSaKtKNzPJn9EH9WfiB2Ojf2zaTCUrKhtrd54CtKgUo/dQmDh67VUx1fR+NSupBE= X-Received: by 2002:a4a:6f0e:: with SMTP id h14mr7921327ooc.9.1626448616309; Fri, 16 Jul 2021 08:16:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kenneth Adam Miller Date: Fri, 16 Jul 2021 10:16:44 -0500 Message-ID: Subject: Re: QEMU System and User targets To: Peter Maydell Content-Type: multipart/alternative; boundary="00000000000005476205c73f14bc" Received-SPF: pass client-ip=2607:f8b0:4864:20::c2e; envelope-from=kennethadammiller@gmail.com; helo=mail-oo1-xc2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --00000000000005476205c73f14bc Content-Type: text/plain; charset="UTF-8" When I go to build the qemu softmmu target the shared files - the i386_ss of my arch - gives problems where the build system isn't specifying the include headers for the compiler to find the surrounding headers that belong to different parts of the qemu library. I was able to edit my own source only so much before recursive header dependencies had included their own respective qemu library components subdirectories, at which point the build fails with cannot find header. I want to know, are these shared source set files not supposed to include those qemu subcomponents? Or resolve a different way for each target using #ifdef guards? I would think that this would be modularized from within the qemu subcomponent library. And I think that configure and meson are working together to generate the correct build commands to these shared components. So I'm unsure what to do. On Thu, Jul 15, 2021 at 11:39 AM Kenneth Adam Miller < kennethadammiller@gmail.com> wrote: > Oh I didn't know that there was a i386_user_ss in order to see that it was > intended that they were shared that way, so I initially thought that > i386_ss was user only until I saw it in the build. > > On Thu, Jul 15, 2021 at 11:35 AM Peter Maydell > wrote: > >> On Thu, 15 Jul 2021 at 17:25, Kenneth Adam Miller >> wrote: >> > >> > Well certainly, I know they are different executables. I'm just trying >> to understand how the different targets work. >> > >> > By subsumes, I mean that just looking at the meson.build for i386, you >> can see that there are files added to the i386_ss, but not visibly added to >> the softmmu target. But the softmmu target has those files built whenever >> you configure and build it. >> >> In the meson.build files, i386_ss is files built for both softmmu and >> user; >> i386_user_ss is files built for usermode only; i386_softmmu_ss is files >> built for softmmu only. target/i386/meson.build sets target_arch, >> target_softmmu_arch and target_user_arch to these sourcesets. >> The top level meson.build adds the relevant target_* sourcesets to the >> set of sources required to build the various executables. >> >> Some source files also use #ifdefs: you can look for ifdefs on >> CONFIG_USER_ONLY and CONFIG_SOFTMMU to find code that's conditionally >> compiled in different ways for the two executables. >> >> -- PMM >> > --00000000000005476205c73f14bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When I go to build the qemu softmmu target the shared file= s - the i386_ss of my arch - gives problems where the build system isn'= t specifying the include headers for the compiler to find the surrounding h= eaders that belong to different parts of the qemu library. I was able to ed= it my own source only so much before recursive header dependencies had incl= uded their own respective qemu library components subdirectories, at which = point the build fails with cannot find header. I want to know, are these sh= ared source set files not supposed to include those qemu subcomponents? Or = resolve a different way for each target using #ifdef guards? I would think = that this would be modularized from within the qemu subcomponent library. A= nd I think that configure and meson are working together to generate the co= rrect build commands to these shared components. So I'm unsure what to = do.

On Thu, Jul 15, 2021 at 11:39 AM Kenneth Adam Miller <kennethadammiller@gmail.com> wrote:<= br>
Oh I didn't know that there was a i386_user_ss=C2=A0in order to see th= at it was intended that they were shared that way, so I initially thought t= hat i386_ss was user only until I saw it in the build.

On Thu, Jul 15, 2021= at 11:35 AM Peter Maydell <peter.maydell@linaro.org> wrote:
On Thu, 15 Jul 2021 at 17:25, Ken= neth Adam Miller
<kennet= hadammiller@gmail.com> wrote:
>
> Well certainly, I know they are different executables. I'm just tr= ying to understand how the different targets work.
>
> By subsumes, I mean that just looking at the meson.build for i386, you= can see that there are files added to the i386_ss, but not visibly added t= o the softmmu target. But the softmmu target has those files built whenever= you configure and build it.

In the meson.build files, i386_ss is files built for both softmmu and user;=
i386_user_ss is files built for usermode only; i386_softmmu_ss is files
built for softmmu only. target/i386/meson.build sets target_arch,
target_softmmu_arch and target_user_arch to these sourcesets.
The top level meson.build adds the relevant target_* sourcesets to the
set of sources required to build the various executables.

Some source files also use #ifdefs: you can look for ifdefs on
CONFIG_USER_ONLY and CONFIG_SOFTMMU to find code that's conditionally compiled in different ways for the two executables.

-- PMM
--00000000000005476205c73f14bc--