Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5252884rwb; Sun, 4 Dec 2022 17:45:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf6V7JxyWH5eO4etZKwGr7pcVMzd+bTKKm1DexQLfeSbH2SV9DD61YtLNEhbFW9SxJDxGzlU X-Received: by 2002:a05:6402:5513:b0:467:7026:515e with SMTP id fi19-20020a056402551300b004677026515emr72745277edb.26.1670204734135; Sun, 04 Dec 2022 17:45:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670204734; cv=none; d=google.com; s=arc-20160816; b=a7AhO4ftlAOj7MDJ1uZK8vgYHrK6LtEJqXeLe0vWywMprJt43tmN/qSvxYpkfCzPKt XXFWnHAHSNNYZhfiqz6Cdj3EBYNg6WGpS1FumBESNZeRJpdGaPJdq9oXw0C8KY2SwmKP rkhjcw67pbzkBzMW/e68MGkFQcl/V+dOfINEsqrn3D4M2vraUYQbTDw2tim5Qsxz9pUB wjRk40SGgnie2x/IXCmLAaLP2mZ1UiNMiWIklhcgthUMBFaJS4IrlYLvL8KcRiERe70r av15E3J+TndQWIlsx7N1ciyxrwfVxK4mabHGYthoyJA6PCjsw4FMys3Y/4JV2xpLaxHc NEKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KdzQ9qFU5ryt8es2shJSPDOZev0iGBpKbvgDZa2HRrM=; b=piNRLAzGtTj9suB6jDQGDCc5jodWtQKh3BQzwwz43+clrpYk9JghMIUCmIJGA5hXU3 +Bk1U9ruUZ+tLAbf+jUqWVzubtVf1L1s+ZZNV6ywd4yntwWSCFAWf8J7DbEu+a0tTJPI ogOzAJS4ul84BRP47oBF0/I6MKf/JTrI+QFU2GuCtArhfmCwHRDz6gGS9U536GTnOI/p iVtTdjI7tWahQkhqnF+8gIT1lmgxzW1pmhYX7TW1b1gnmOZv3I8jbC0KiAfz2xZTY9Ev FQRJ/1mvZ6DwmEKruWx0+X0Rr75ctBBUxX9KRpizmucWheV7E1zyvboAZk+gjnlsYuWv klXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c4OG6YkZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a05640250cf00b0044f2eb2de9asi11398055edb.444.2022.12.04.17.45.14; Sun, 04 Dec 2022 17:45:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c4OG6YkZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbiLEAxJ (ORCPT + 82 others); Sun, 4 Dec 2022 19:53:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231207AbiLEAwx (ORCPT ); Sun, 4 Dec 2022 19:52:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEA85D11F; Sun, 4 Dec 2022 16:52:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F133B60F41; Mon, 5 Dec 2022 00:52:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 635E2C4314B; Mon, 5 Dec 2022 00:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670201568; bh=jib82Q01YLW3qx/1zSi+9r7M6nVqOE5J7EtK6lVWsFM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=c4OG6YkZrqiaTLIU3ys/J39EJHbE0hDlBhlf+ojGPQYhfQh0CYGbbMnVKCG5tJF2l W3T7Je3F86HVLFO/ukr9uJ4fBrxq7dl+BfPjdQdzPltQ4BuUHyuBAhaddRA+GYu8Ow m8zOfWR0d6CP3dXSDZxmcMCpWTfmya6+lsRPiX3cHEERrT1AwrdhYAj2ICX3XBncRb h8PK95kI+/xvvUw/96dBh1ytcCsrlXCsk7x3k8UDjq3xEywThzN5vOT7RhIg/2JYNx Pblx1hVINMQSVbiNNbcOo5BZHmjm3d/blXgf50K6+p6nvGZVe8C/nETLnKKrYyjUoX lPdOwhP515c6A== Received: by mail-ed1-f53.google.com with SMTP id d20so13781560edn.0; Sun, 04 Dec 2022 16:52:48 -0800 (PST) X-Gm-Message-State: ANoB5pnIHEVN/MrdMvIN0CQR1qOcvuH/7A39sJanjJrffzEZwPTL6SZa E2Zpi29hW+2YRvymVDSUZofuOtY2klMOWkJfEiw= X-Received: by 2002:a05:6402:538a:b0:458:fbd9:e3b1 with SMTP id ew10-20020a056402538a00b00458fbd9e3b1mr15849493edb.6.1670201566654; Sun, 04 Dec 2022 16:52:46 -0800 (PST) MIME-Version: 1.0 References: <20221204174632.3677-1-jszhang@kernel.org> <20221204174632.3677-13-jszhang@kernel.org> In-Reply-To: <20221204174632.3677-13-jszhang@kernel.org> From: Guo Ren Date: Mon, 5 Dec 2022 08:52:35 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 12/13] riscv: KVM: Switch has_svinval() to riscv_has_extension_unlikely() To: Jisheng Zhang Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , Anup Patel , Atish Patra , Heiko Stuebner , Andrew Jones , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Guo Ren On Mon, Dec 5, 2022 at 1:57 AM Jisheng Zhang wrote: > > From: Andrew Jones > > Switch has_svinval() from static branch to the new helper > riscv_has_extension_unlikely(). > > Signed-off-by: Andrew Jones > --- > arch/riscv/kvm/tlb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/riscv/kvm/tlb.c b/arch/riscv/kvm/tlb.c > index 309d79b3e5cd..aa3da18ad873 100644 > --- a/arch/riscv/kvm/tlb.c > +++ b/arch/riscv/kvm/tlb.c > @@ -15,8 +15,7 @@ > #include > #include > > -#define has_svinval() \ > - static_branch_unlikely(&riscv_isa_ext_keys[RISCV_ISA_EXT_KEY_SVINVAL]) > +#define has_svinval() riscv_has_extension_unlikely(RISCV_ISA_EXT_SVINVAL) > > void kvm_riscv_local_hfence_gvma_vmid_gpa(unsigned long vmid, > gpa_t gpa, gpa_t gpsz, > -- > 2.37.2 > -- Best Regards Guo Ren