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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0463C433EF for ; Tue, 28 Sep 2021 12:55:22 +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 79DA1611CE for ; Tue, 28 Sep 2021 12:55:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 79DA1611CE 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]:37754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVCdk-0000aL-6T for qemu-devel@archiver.kernel.org; Tue, 28 Sep 2021 08:55:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVCZ1-0005pw-G1 for qemu-devel@nongnu.org; Tue, 28 Sep 2021 08:50:29 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:34583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVCYv-0000g5-En for qemu-devel@nongnu.org; Tue, 28 Sep 2021 08:50:23 -0400 Received: by mail-qk1-x736.google.com with SMTP id i132so40629927qke.1 for ; Tue, 28 Sep 2021 05:50:20 -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=Nifb82zOt4L1jbCwPB7F1P15sSowUBIE8D9lmMaSkIc=; b=QQ9nWeMK37xStcubx5e+t+SHBrmDrrKwfBTLAsALjR6DY5Ovu9JPPhirBPbfifK8fz NHDuAztWuYHEbVLtW62c2/+6COPAbNLeIIFH7l1YGntdchiD35RnsvDK7QvzqB19/6Ho L/GnECrVa8nyNWWAL6ffkYgS5FlMPrQdMWvgu2/MjfixA168PPKiIiqvKxj+GgY13Wh1 DZzKBLmYWPyg03+zV3l9xfTKS7iR+eOq4fyYW1W8OGSotD/lJop0+GgutXAgLBUy+aCJ N8a1OQ475pkuEYpyHmYfIcvOlJcuWaKGaG2Qlek2ioKu9Ur433jNIJ8yRAljI8bBDxJt ywng== 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=Nifb82zOt4L1jbCwPB7F1P15sSowUBIE8D9lmMaSkIc=; b=PTTD9qFKg9CtcrN1FcIT/Dtt5IHR398X6YQg7ih99FGDaSGO4Clk7vXhALoKT1yUZ1 lJrxBVscQU1QK2NiOIcuhp8U1lyXLPVtjyTgy67tWcP4rcOCblPQZzbjLvhIxcy6cG36 rzMf6QaqMP7hpTBMt3NN1Fy6fnQ2oToBbNe/HjCzeKMJ3oOlXx6m23ZNJcBtZs6l+k2d o9sMRU+11RMwOcPOBwTMFJEuR/u4/7McFeTbTiGQM+6AaOJX7Zz0/x9avP3s0Kz/hMnn Zifhoi/9fGsKkLBXdmlNbcDFHy0RvlDr02QN46BKmEjQ0NEyBZ97JyHUA30CyVSfnId/ 8qLg== X-Gm-Message-State: AOAM533LuiOaBPu5A71S8OVOpIUTgQx0knOW7PKBgCX4zq63UlK99/oz 553BCBo5wtluj6NQ1Jn/cQkx0A== X-Google-Smtp-Source: ABdhPJxwCmNVP4ejlJqyMRRsFa/BQaGuBqPrVm4WaB55TO71/7vz+lXnPtevUz/ZWeoo6QPQ0hWAgw== X-Received: by 2002:a37:8085:: with SMTP id b127mr4957268qkd.449.1632833419774; Tue, 28 Sep 2021 05:50:19 -0700 (PDT) Received: from [192.168.3.43] (cpe-24-31-215-130.sc.res.rr.com. [24.31.215.130]) by smtp.gmail.com with ESMTPSA id y22sm14358443qkp.9.2021.09.28.05.50.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 05:50:19 -0700 (PDT) Subject: Re: [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps To: Gerd Hoffmann References: <20210831121545.2874233-1-kraxel@redhat.com> <20210831121545.2874233-11-kraxel@redhat.com> <20210928113204.ic2syx4w2cjsqr7h@sirius.home.kraxel.org> From: Richard Henderson Message-ID: <9d3cceef-f385-5d0b-6b0d-2b7be17ce187@linaro.org> Date: Tue, 28 Sep 2021 08:50:14 -0400 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: <20210928113204.ic2syx4w2cjsqr7h@sirius.home.kraxel.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::736; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x736.google.com X-Spam_score_int: -46 X-Spam_score: -4.7 X-Spam_bar: ---- X-Spam_report: (-4.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=-2.562, 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 , "Michael S. Tsirkin" , Bin Meng , David Hildenbrand , qemu-devel@nongnu.org, Peter Xu , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Alexandre Iooss , Huacai Chen , Halil Pasic , Christian Borntraeger , Palmer Dabbelt , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Thomas Huth , Eduardo Habkost , Greg Kurz , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?UTF-8?Q?Alex_Benn=c3=a9e?= , David Gibson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Laurent Vivier , qemu-ppc@nongnu.org, Paolo Bonzini , Mahmoud Mandour , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 9/28/21 7:32 AM, Gerd Hoffmann wrote: > diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h > index 608d768a4371..72e4e3b5bb89 100644 > --- a/include/exec/exec-all.h > +++ b/include/exec/exec-all.h > @@ -160,7 +160,9 @@ void tlb_flush_page_all_cpus_synced(CPUState *src, target_ulong addr); > * so this is generally safe. If more selective flushing is required > * use one of the other functions for efficiency. > */ > +#ifdef TCG_DIRECT_CALL > void tlb_flush(CPUState *cpu); > +#endif I'm pretty sure you can drop these ifdefs. Just because there's a regular declaration for a function doesn't mean a subsequent inline definition does not apply. And even if that didn't work, I'd be willing to trade inline expansion for not adding lots of ifdefs... > +static inline void tlb_flush(CPUState *cpu) > +{ > + tcg.tlb_flush(cpu); > +} ... these could just as well be out-of-line. r~ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mVCZ7-0005rW-FF for mharc-qemu-riscv@gnu.org; Tue, 28 Sep 2021 08:50:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVCYx-0005pi-3M for qemu-riscv@nongnu.org; Tue, 28 Sep 2021 08:50:27 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:36740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVCYv-0000g2-Em for qemu-riscv@nongnu.org; Tue, 28 Sep 2021 08:50:22 -0400 Received: by mail-qk1-x735.google.com with SMTP id p4so40567637qki.3 for ; Tue, 28 Sep 2021 05:50:20 -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=Nifb82zOt4L1jbCwPB7F1P15sSowUBIE8D9lmMaSkIc=; b=QQ9nWeMK37xStcubx5e+t+SHBrmDrrKwfBTLAsALjR6DY5Ovu9JPPhirBPbfifK8fz NHDuAztWuYHEbVLtW62c2/+6COPAbNLeIIFH7l1YGntdchiD35RnsvDK7QvzqB19/6Ho L/GnECrVa8nyNWWAL6ffkYgS5FlMPrQdMWvgu2/MjfixA168PPKiIiqvKxj+GgY13Wh1 DZzKBLmYWPyg03+zV3l9xfTKS7iR+eOq4fyYW1W8OGSotD/lJop0+GgutXAgLBUy+aCJ N8a1OQ475pkuEYpyHmYfIcvOlJcuWaKGaG2Qlek2ioKu9Ur433jNIJ8yRAljI8bBDxJt ywng== 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=Nifb82zOt4L1jbCwPB7F1P15sSowUBIE8D9lmMaSkIc=; b=Tn36Rv4nLqiOKWTSc5yKLsVoJNqfv+l/pW3apIsPT6gSDqGBbRilbm1OtYgHOKX9FS ZXAwcQYaE8GFlXZwdEqr0KOIJQZhUODYZQdzAazxt+w46B1jqhDgqrduO9OALvZ2dW4V iVoVOQd7OqUhrqR6wYw8SgWNYwuVLLfWwvAioWLq+vOUa9g4leazqKbCN0+khwAoCRN9 KJFZjz1447AI+kyyxv4EPJBGUDsYJmrdeypR5MOhED7Gd98q6G9dM7//Tvg1s6LJRmFG zl46LaD4IWbqeQ00LvXTduST17fdxo48mhzJCA98Eibk6vRsh/1upBRoyuCLa23vEXAN P7Pg== X-Gm-Message-State: AOAM531/PWn0cEQMMZhEDOPTeeN3ycOSfi2vs2gxZmhnmAsNQ0YJIip2 WLdTm9Jt0/Z6ixIQjeN6UiN7uw== X-Google-Smtp-Source: ABdhPJxwCmNVP4ejlJqyMRRsFa/BQaGuBqPrVm4WaB55TO71/7vz+lXnPtevUz/ZWeoo6QPQ0hWAgw== X-Received: by 2002:a37:8085:: with SMTP id b127mr4957268qkd.449.1632833419774; Tue, 28 Sep 2021 05:50:19 -0700 (PDT) Received: from [192.168.3.43] (cpe-24-31-215-130.sc.res.rr.com. [24.31.215.130]) by smtp.gmail.com with ESMTPSA id y22sm14358443qkp.9.2021.09.28.05.50.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 05:50:19 -0700 (PDT) Subject: Re: [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, Aurelien Jarno , Laurent Vivier , Peter Xu , Peter Maydell , Marcel Apfelbaum , Cornelia Huck , qemu-ppc@nongnu.org, Bastian Koppelmann , Thomas Huth , Eduardo Habkost , qemu-riscv@nongnu.org, David Gibson , Aleksandar Rikalo , Stafford Horne , Huacai Chen , Halil Pasic , Palmer Dabbelt , Bin Meng , Mahmoud Mandour , Max Filippov , Alexandre Iooss , Greg Kurz , "Edgar E. Iglesias" , qemu-arm@nongnu.org, =?UTF-8?Q?Alex_Benn=c3=a9e?= , "Michael S. Tsirkin" , Paolo Bonzini , Alistair Francis , qemu-s390x@nongnu.org, Christian Borntraeger , Jiaxun Yang , David Hildenbrand , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= References: <20210831121545.2874233-1-kraxel@redhat.com> <20210831121545.2874233-11-kraxel@redhat.com> <20210928113204.ic2syx4w2cjsqr7h@sirius.home.kraxel.org> From: Richard Henderson Message-ID: <9d3cceef-f385-5d0b-6b0d-2b7be17ce187@linaro.org> Date: Tue, 28 Sep 2021 08:50:14 -0400 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: <20210928113204.ic2syx4w2cjsqr7h@sirius.home.kraxel.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::735; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x735.google.com X-Spam_score_int: -46 X-Spam_score: -4.7 X-Spam_bar: ---- X-Spam_report: (-4.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=-2.562, 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-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2021 12:50:29 -0000 On 9/28/21 7:32 AM, Gerd Hoffmann wrote: > diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h > index 608d768a4371..72e4e3b5bb89 100644 > --- a/include/exec/exec-all.h > +++ b/include/exec/exec-all.h > @@ -160,7 +160,9 @@ void tlb_flush_page_all_cpus_synced(CPUState *src, target_ulong addr); > * so this is generally safe. If more selective flushing is required > * use one of the other functions for efficiency. > */ > +#ifdef TCG_DIRECT_CALL > void tlb_flush(CPUState *cpu); > +#endif I'm pretty sure you can drop these ifdefs. Just because there's a regular declaration for a function doesn't mean a subsequent inline definition does not apply. And even if that didn't work, I'd be willing to trade inline expansion for not adding lots of ifdefs... > +static inline void tlb_flush(CPUState *cpu) > +{ > + tcg.tlb_flush(cpu); > +} ... these could just as well be out-of-line. r~