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=-10.9 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 9DEF4C433EF for ; Fri, 3 Sep 2021 19:47:17 +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 5270060FA0 for ; Fri, 3 Sep 2021 19:47:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5270060FA0 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]:47842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMF9g-0006pU-92 for qemu-devel@archiver.kernel.org; Fri, 03 Sep 2021 15:47:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMEuD-0004Yg-B0 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 15:31:17 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:47085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMEu6-0002hJ-DF for qemu-devel@nongnu.org; Fri, 03 Sep 2021 15:31:14 -0400 Received: by mail-wm1-x32c.google.com with SMTP id m25-20020a7bcb99000000b002e751bcb5dbso214145wmi.5 for ; Fri, 03 Sep 2021 12:31:09 -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=5AI83WewnZnYkPXwZnd2Q/eU9eygrBsbivngRE4BXiQ=; b=P4ISVXfvobqG12Z6RoTOI5UGIr/4McKEzBRjkpnJVeCZevklJ/WV/0lQBT+voH2SUY t0dVslctqlM5DOtyjeqjkUvPjGWjj1dhiEdyZQeWioK8rQRoWy5A5NcKlSGuzKW3aWqj t2bT7b9xG9bD7XISjXwWDKsCHqd+100iir2zh/3XRm8EAkGO06KgFLng+vuhbRGyvSoR AObhwaMSw7osyojtzotiYTY7cxvr3JYasdODvCk6KW0vBIVPJ0cpLiVEP0EFP/cmNIcL vTd4VlnM3ebyqP3INvEw9GWo/Z410XL/Oo2itgtLLE/TkG/P7c4oBYv9h2IqwiQYnS7X J5sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=5AI83WewnZnYkPXwZnd2Q/eU9eygrBsbivngRE4BXiQ=; b=oXPueMIxVvfMhlOjPbpTZalEExsFAG30ob4jRLNENte4ecBwJWfuyRIEAP67HNTBp2 sce4Me2yKIg19b1oQUbtjvGXQNsE7A5yNucHXjgwdidEHJa04PeA7EMH2djplE66nPPM F8KPRt/NbikObN+iRNDPRTKIcZtmvtfOAOgjlkoc0bGCpHhITreF09YbHQuRbgaQ513W ZkcRfIae+8dgdIEDtPNQ/EMX2GHWehfj2RhUU80Qg3mrup0NyM1LAOO/pHEUP+h5PJn7 u6mpYGq1agBd6IgxvQ5jU1xLIo1GkqmiIdx8jjftDMFHx7kqBB4pS8DEuXykQi0sGuNz QvNQ== X-Gm-Message-State: AOAM53193KNI7d9eNopZB/YeVF6P9WMZ2sgtRYGWs1aZTxgMpA5jwOlf WuUYb1De0Adt8p/fCy2jlkcKRQ== X-Google-Smtp-Source: ABdhPJyNPnhhhAtbo2njo6bCAr3WAaEKFNGmuE7LF325krCnfwymK4ah4w6eYAokj7v99c7wD74wnA== X-Received: by 2002:a1c:1c2:: with SMTP id 185mr289419wmb.11.1630697468395; Fri, 03 Sep 2021 12:31:08 -0700 (PDT) Received: from [192.168.8.107] (190.red-2-142-216.dynamicip.rima-tde.net. [2.142.216.190]) by smtp.gmail.com with ESMTPSA id f17sm286460wmf.4.2021.09.03.12.31.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Sep 2021 12:31:08 -0700 (PDT) Subject: Re: [PATCH v3 01/30] accel/tcg: Restrict cpu_handle_halt() to sysemu To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org References: <20210902161543.417092-1-f4bug@amsat.org> <20210902161543.417092-2-f4bug@amsat.org> From: Richard Henderson Message-ID: Date: Fri, 3 Sep 2021 21:31:02 +0200 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: <20210902161543.417092-2-f4bug@amsat.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 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=-0.888, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Peter Maydell , Cornelia Huck , kvm@vger.kernel.org, David Hildenbrand , Bin Meng , Mark Cave-Ayland , Aleksandar Rikalo , Laurent Vivier , Max Filippov , Taylor Simpson , haxm-team@intel.com, Colin Xu , "Edgar E. Iglesias" , Stafford Horne , Marek Vasut , Stefano Stabellini , Yoshinori Sato , Paul Durrant , Kamil Rytarowski , Reinoud Zandijk , Claudio Fontana , Anthony Perard , xen-devel@lists.xenproject.org, Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Greg Kurz , Cameron Esfahani , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Michael Rolnik , Sunil Muthuswamy , Palmer Dabbelt , David Gibson , qemu-riscv@nongnu.org, Bastian Koppelmann , Chris Wulff , Roman Bolshakov , qemu-ppc@nongnu.org, Wenchao Wang , Alistair Francis , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 9/2/21 6:15 PM, Philippe Mathieu-Daudé wrote: > +#ifndef CONFIG_USER_ONLY > static inline bool cpu_handle_halt(CPUState *cpu) > { Hmm, slightly better to move the ifdef just inside here, > @@ -607,6 +608,7 @@ static inline bool cpu_handle_halt(CPUState *cpu) > and here, > return false; > } > +#endif /* !CONFIG_USER_ONLY */ > > static inline void cpu_handle_debug_exception(CPUState *cpu) > { > @@ -865,9 +867,11 @@ int cpu_exec(CPUState *cpu) > /* replay_interrupt may need current_cpu */ > current_cpu = cpu; > > +#ifndef CONFIG_USER_ONLY > if (cpu_handle_halt(cpu)) { > return EXCP_HALTED; > } > +#endif which would eliminate this one. r~