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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C21F9C433EF for ; Sun, 12 Sep 2021 16:29:04 +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 777DE61076 for ; Sun, 12 Sep 2021 16:29:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 777DE61076 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:48324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPSLn-0004XT-F5 for qemu-devel@archiver.kernel.org; Sun, 12 Sep 2021 12:29:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPSKy-0003rh-I1 for qemu-devel@nongnu.org; Sun, 12 Sep 2021 12:28:12 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:34617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPSKx-0006rq-2B for qemu-devel@nongnu.org; Sun, 12 Sep 2021 12:28:12 -0400 Received: by mail-pf1-x42d.google.com with SMTP id g14so6612382pfm.1 for ; Sun, 12 Sep 2021 09:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=c0I7eAdjTS9iAkI7ss1t1Q9/vdq+Vq+A/NDcjzTtvwU=; b=TPrtMKFM8AkYiU7m6xtMnBtaW5I8tGo/AJAkQubIpxM2agC1vvnHG0dE/uJFLEzAKc e7yMT7b0C+PKAZDTw0Pbt7K0Y0KSYt4VjI2M/NFBAV6AHxaM+SuZ/Sxici9ijR46zYGa 59FVOBRdrr6aQGE5ydl9ryVkXpQzOJankt/+D+8HwO1vsZLRYNe+qeS3zsZZMJK69knj xT9uQnror0b/GQd0RlRj184ravDGtkp3upSXtmkaEDJN54LiExFTP1zVI6RL0uvV9q9a Msy+aZTDpKXaoo7Ywmwi0gC/BhQjp+brmi97Z60QzdGnafI1IA2rcmvxFQ3cg8NuTL10 FjrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=c0I7eAdjTS9iAkI7ss1t1Q9/vdq+Vq+A/NDcjzTtvwU=; b=o88Vr1RVCpp+ApodWqrspe6ilqxba8AKGrity6cq4zOWOjLlZXrESqK4bNvKy/DK4n ZaOIDSkvYmNKyQDNW/bHE5XQ4xgeVWlbZRQPH1OI2ggYRinonCYITElWpYUzN0wXmVmi 40g88MbxfWhpw3XYrd4R0jkQxCRM3qGihiSVsHmLJQU++UhWuD++wU+fH0ABDlKrwX4M KFLv8lbTtLfDgQA9m5xJZ0F2PD36QKLu5AIq489FKIb9QKZq+uBIK4QjihpBK7xWTHIG UX3mA0T6mlA+VgD3V2Pqf5BiB9h++SK49tIebO0NVYPM45sOCXzBI5YbaufyjfinRLOk 9j6g== X-Gm-Message-State: AOAM5333eb3Xhe20JPkQXy+adikbQjl2JaDeqnUWZa52dTr1K+O7uHfN kfh0MuHNBikJscT0LnS91/JiiA== X-Google-Smtp-Source: ABdhPJzHP8Riy6v1Dtyb8xYEJFNgvHsyoMwjAZLnInO4jjP2Y/cnJ5mwnL0UGYghoC2E/A/WmtYpow== X-Received: by 2002:aa7:88c9:0:b0:3fc:38d8:fc32 with SMTP id k9-20020aa788c9000000b003fc38d8fc32mr7054977pff.81.1631464089447; Sun, 12 Sep 2021 09:28:09 -0700 (PDT) Received: from [192.168.1.11] ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id d22sm4234106pfv.196.2021.09.12.09.28.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Sep 2021 09:28:09 -0700 (PDT) Subject: Re: [PATCH v2 7/9] linux-user: Split linux-user internals out of qemu.h To: Peter Maydell , qemu-devel@nongnu.org References: <20210908154405.15417-1-peter.maydell@linaro.org> <20210908154405.15417-8-peter.maydell@linaro.org> From: Richard Henderson Message-ID: <12d3f905-864c-30eb-e274-e3f37c5c1b27@linaro.org> Date: Sun, 12 Sep 2021 09:28:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210908154405.15417-8-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 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, NICE_REPLY_A=-3.584, 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: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 9/8/21 8:44 AM, Peter Maydell wrote: > qemu.h is included in various non-linux-user files (which > mostly want the TaskState struct and the functions for > doing usermode access to guest addresses like lock_user(), > unlock_user(), get_user*(), etc). > > Split out the parts that are only used in linux-user itself > into a new user-internals.h. This leaves qemu.h with basically > three things: > * the definition of the TaskState struct > * the user-access functions and macros > * do_brk() > all of which are needed by code outside linux-user that > includes qemu.h. > > The addition of all the extra #include lines was done with > sed -i '/include.*qemu\.h/a #include "user-internals.h"' $(git grep -l 'include.*qemu\.h' linux-user) > (and then undoing the change to fpa11.h). > > Signed-off-by: Peter Maydell > --- Reviewed-by: Richard Henderson r~