Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1227295rdb; Wed, 20 Sep 2023 03:28:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwKBn51ur9YRCduge9yfVx6PsP8BWri4AOTVNBL3EDs/o4wPd5R6AyUR8mx44STxGVkK5V X-Received: by 2002:a17:90a:ea0b:b0:274:98c4:b6e8 with SMTP id w11-20020a17090aea0b00b0027498c4b6e8mr2153339pjy.5.1695205692981; Wed, 20 Sep 2023 03:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695205692; cv=none; d=google.com; s=arc-20160816; b=YOJ8Rv5bS6w3lS4KKMmyi+WlwO/hvQQuGsaP9iFba/LL8Cbk0AQfFu80qGBzyeTRIk eRrHNx02Q0YNZKUgcKdSgWSR8sU1/lne+XJwmNPGN9kN5nz0tPCQ7eBjpPVM+FUF5RHS KxIazHy1wAGeO94AMz7y8UpShRMF+kiEUDj5jKbMIBGe5gho+YQqGgMKr21e6WYqnLeH +yPt+MyxyGFDksrPifyDwoq2BldMYLlUt7DxnqfhMcSbmGw4CyGKc+QrMa42wBjNaJOd nNRrVe/4fLcyFsl3GdcoWEVNRrxu4b1vgNlL+d2aukKQ4QfHoKH5yTQgCfb+EnhvyyQA 0z+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zz3/ecOKh4XgsJl46wvd3sKyjYtoix9I3w8gro1wfuw=; fh=vy7D0OYcPZh9HXWp2KA8VVDgG1BWaCTF4Kp9ALvlhso=; b=HfqJHS8i7P8HWFy4+Hm/hvaMDb3VpR05Q/SXT/1hBdfno7P4MlE7LHlxSSdeROh0kO HY5YLqHqkoWVk/DUXGs6gcRMhaRwywbZf+zwrcBBWHeLXI7LexmrbcE1AXCvxxK+8VsS 8wECdGi7SPeh69LrctvQsEbtMy2TmakegKmQgCrdnyTG1e6DRi5onncUp1Mtyk/44U7i pZHO1xhWNRJxu5o11mL/E7GYI31okcEUyWELEUDApCRxY9kuxRsrE/wSSeBed1l5jd0w TNZqdrqg86Gj+r5zvjU07cMvchIKhrQ+oDiDL3n4MCZzKtQGU7PqOkZZpef10eSqvXlw AsTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=cm0vLhfh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ei5-20020a17090ae54500b00268a8e0cab3si1221272pjb.178.2023.09.20.03.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:28:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=cm0vLhfh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 623C08076D21; Wed, 20 Sep 2023 00:38:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233846AbjITHid (ORCPT + 99 others); Wed, 20 Sep 2023 03:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233879AbjITHiS (ORCPT ); Wed, 20 Sep 2023 03:38:18 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 456FC128 for ; Wed, 20 Sep 2023 00:38:11 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-404fbfac998so40813395e9.3 for ; Wed, 20 Sep 2023 00:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695195490; x=1695800290; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zz3/ecOKh4XgsJl46wvd3sKyjYtoix9I3w8gro1wfuw=; b=cm0vLhfht5SysJJxneUJRJXDWefeNpW+wH2/8WrEcjg28/Usqq2r5VVb6o5oH7gHy6 7N8eZ39T8tDSBOK1hg63PfQi7k1Wm3TtLpjgxKbk8mo2EXZ/qSIQKrRxMdJGgdz44MMp 3cVSuNYnvWbvwUrRzujB+KGPDS5IUUsoG6OjcLlfwwGYd8mH2xHm5AXbQno8qxpT/V/P XWVY0Zy2s61i73t0tFEMY9chGCBDbCGrHyXQ1QW0UV89GM3IIYu1KxJe+JHYLLAoqx03 X7P6n6YmUOe2u2YMFwOnxEn9X4DjJ3MI6eLq2VrzW4T+StGvTuByOsHZmEjQuefSGM+2 65Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695195490; x=1695800290; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zz3/ecOKh4XgsJl46wvd3sKyjYtoix9I3w8gro1wfuw=; b=bRO9FI8dv2xTGasXvNftGRRh15ooVGItjtuZrxVGbj2ejIPG1kVdJo1D2aiOIRgh0L 4w6ky9Z13dFN0b6sgFomWLWVzd/2V5eTP2rskFafnvYAAmpazAWTBOYCnmIz1jkM7Y5o I8bEtth2ndEIP0oqyBrx51F4j6GWkNmCrgGruYQf6fJMaIp59ZrRLTwcw3t9iByK9Gke NUCha7LGu3IXJQ8snz5nOLrOwRlaeY4Vj2NBa1GedIvtnEdvTm73ZzjjVnylA8zVWIf1 ZZiI/TA+ISwGWIbmY6BZQS2A1i2q7FycgiIlq4AUZwvIz+04OIqvmb9WktBp77JfCmx2 kqxg== X-Gm-Message-State: AOJu0YwsZIMkm/Jk1uaJdo84SYsnJijXS2aZ9uMUMeQ85ygt8R8c+uW+ I42koUQgP4Nw2LOma5vtv7K6DQ== X-Received: by 2002:a05:600c:2909:b0:401:2ee0:754a with SMTP id i9-20020a05600c290900b004012ee0754amr1614112wmd.13.1695195489693; Wed, 20 Sep 2023 00:38:09 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c510500b004052093a8f6sm1176515wms.25.2023.09.20.00.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 00:38:09 -0700 (PDT) Date: Wed, 20 Sep 2023 09:38:03 +0200 From: Andrew Jones To: Anup Patel Cc: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Shuah Khan , Mayuresh Chitale , devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 1/7] RISC-V: Detect XVentanaCondOps from ISA string Message-ID: <20230920-ab82cd5fbac7606ba747afa4@orel> References: <20230919035343.1399389-1-apatel@ventanamicro.com> <20230919035343.1399389-2-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230919035343.1399389-2-apatel@ventanamicro.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 20 Sep 2023 00:38:44 -0700 (PDT) On Tue, Sep 19, 2023 at 09:23:37AM +0530, Anup Patel wrote: > The Veyron-V1 CPU supports custom conditional arithmetic and > conditional-select/move operations referred to as XVentanaCondOps > extension. In fact, QEMU RISC-V also has support for emulating > XVentanaCondOps extension. > > Let us detect XVentanaCondOps extension from ISA string available > through DT or ACPI. > > Signed-off-by: Anup Patel > --- > Documentation/devicetree/bindings/riscv/extensions.yaml | 7 +++++++ > arch/riscv/include/asm/hwcap.h | 1 + > arch/riscv/kernel/cpufeature.c | 1 + > 3 files changed, 9 insertions(+) > > diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml > index 36ff6749fbba..cad8ef68eca7 100644 > --- a/Documentation/devicetree/bindings/riscv/extensions.yaml > +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml > @@ -171,6 +171,13 @@ properties: > memory types as ratified in the 20191213 version of the privileged > ISA specification. > > + - const: xventanacondops > + description: | > + The Ventana specific XVentanaCondOps extension for conditional > + arithmetic and conditional-select/move operations defined by the > + Ventana custom extensions specification v1.0.1 (or higher) at > + https://github.com/ventanamicro/ventana-custom-extensions/releases. > + > - const: zba > description: | > The standard Zba bit-manipulation extension for address generation > diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h > index 0f520f7d058a..b7efe9e2fa89 100644 > --- a/arch/riscv/include/asm/hwcap.h > +++ b/arch/riscv/include/asm/hwcap.h > @@ -59,6 +59,7 @@ > #define RISCV_ISA_EXT_ZIFENCEI 41 > #define RISCV_ISA_EXT_ZIHPM 42 > #define RISCV_ISA_EXT_SMSTATEEN 43 > +#define RISCV_ISA_EXT_XVENTANACONDOPS 44 > > #define RISCV_ISA_EXT_MAX 64 > > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c > index 3755a8c2a9de..3a31d34fe709 100644 > --- a/arch/riscv/kernel/cpufeature.c > +++ b/arch/riscv/kernel/cpufeature.c > @@ -182,6 +182,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { > __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL), > __RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT), > __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT), > + __RISCV_ISA_EXT_DATA(xventanacondops, RISCV_ISA_EXT_XVENTANACONDOPS), > }; > > const size_t riscv_isa_ext_count = ARRAY_SIZE(riscv_isa_ext); > -- > 2.34.1 > Besides Conor's comment about splitting the patch, Reviewed-by: Andrew Jones Thanks, drew