Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1182067rdb; Wed, 20 Sep 2023 01:50:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUYu/0sXU1eyZZYDx8zDKx5bMYXa/o1XO+RJL4KqEeCvAd4Yw/Mag/5GYq1XbCJmPTyze0 X-Received: by 2002:a17:90b:1e03:b0:273:e073:1d02 with SMTP id pg3-20020a17090b1e0300b00273e0731d02mr2098292pjb.38.1695199843675; Wed, 20 Sep 2023 01:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695199843; cv=none; d=google.com; s=arc-20160816; b=vjTDHkTizUWcW1SB84OPHPc3FWLYwQKocH4S4bWbcbCsT9rATe1fWfSxUe8epBRwh4 iva+S/eqXdZnJKLXyj79k6qxVGUO0L/oiX5j5tPLUqIB+iXHdxbu+cPwVdkLfGCdHn9p 9+D0W8nyT2MPRiv+J4POpzA5coV4+p3Ueau81CW+oVZZW1pCDfNu0byo27YEw8cwpbzp /4saSsFAJdkXv3UdcU9Mp4HCdF14NezWL5yONYrMprX+bQmENHPEjHUssJomSFev11ni +XnLy4lt487Xzn3SCw5i5h4xdlTtyq0pr7F/StcOOS5+uuCw0jdLYLpmFRc5iUglFHrz 7SBQ== 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=JVunG7o3B5X9vaQEWyirI9ryk0oP6Di9CEjbsBLCF3g=; fh=vy7D0OYcPZh9HXWp2KA8VVDgG1BWaCTF4Kp9ALvlhso=; b=zALXJJBBAAx8MFlKajOqfWRlT0sRHGvvfd/LkXQFBLR0UiSxhf9ysTyXUGqmxvA3O0 R6RVhKBR6cCz5da6iBmnb8hos9xCY0VwOXNdwJchU416lZYF7AGIxGwFbFr+dNn+QW2N RjPeaWlMz6+ixYY/ZjnMO/GluHirfKsvTyZvTzilqAZSNyrP375OoAQ6reazCc/pQkIk jGv3OuUAGyrDp/JZ6Idsj5PAwrMH1lkfjjXUg8J+z0iWFzSEXYzmsL2Y6JwgvePBPtK/ zm9tMO+IUhN+J2xhkgvpMy+0/LKN7oTyDfC5L/sqkahGwT1LlVRf0IgA/R32VdPy9cV/ /QwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=fHfOiLxq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id mn7-20020a17090b188700b00274001b10e8si1118786pjb.112.2023.09.20.01.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 01:50:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=fHfOiLxq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id B233D828FC1C; Wed, 20 Sep 2023 00:47:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234001AbjITHrm (ORCPT + 99 others); Wed, 20 Sep 2023 03:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbjITHrV (ORCPT ); Wed, 20 Sep 2023 03:47:21 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADCD4138 for ; Wed, 20 Sep 2023 00:46:56 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4051fea48a8so6288015e9.2 for ; Wed, 20 Sep 2023 00:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695196015; x=1695800815; 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=JVunG7o3B5X9vaQEWyirI9ryk0oP6Di9CEjbsBLCF3g=; b=fHfOiLxqkX2tSeVZEYuOcrhH248DI/1r3oPkrfSwzvCd19TsI7wsDzMRoMdD8OWrZk Lp9hTAsk6e7YDGOevgOjdXGrYp2urWkCafL/CUA1mjPfLQTUSEmY6zftslcJ8sRQsF2H DEEIHOKzogDrdEKiaXnCu6hP8e5lp6e7UWR3zeDC8aAPIE7H6rWrBRXPHXBjyhIhqJDB cxsxSJDrMxtaNZLu+Tfx9wlAnddAX8HOtLfmEqJ33R0a7SN/WfupE2L6/W6MzyIDtcqW xy6h+xttBcydarZT5XGW21tefc3CjBFu4hoGl5PGEelQcW61/q6oYkqIno0hdw95/tSZ +klA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695196015; x=1695800815; 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=JVunG7o3B5X9vaQEWyirI9ryk0oP6Di9CEjbsBLCF3g=; b=LrBla07k+7UM4CAh5Q2/LsUzoNe/WYXnwKEmHh27ob5RwZPh2RdztNlrrJMoUJujc3 LCXWhdWAh0X7uaLROPIqtim54RJynq8lpQTZJ3uPeWrFCs2BQZBrL477tr5vhojsLpJ4 lgCt27whQmbZc2H4LuMc5gdneWwOvlsfOQA7TdJuHRoH07me4bpNMFT0eaL3tMtrh7hd MxLhuJtWIWo9P5oPd1lh5yahRHcdw+mrqAgLbPbG+WavbqJTdNWQieQya82CypwS6zau yDQhXPdu0zkxZsdOhCWw001e+duQypuGm1mgdQzPN33UhqlknR1qOjBoXVOKQ2CKtpHd +cGQ== X-Gm-Message-State: AOJu0YwIvJoit9qlJQTCdwuZXVLd1kCPSbqOVEcdCmGQMT+viohBQTT4 OnzfcAmLiGRRpMqwsU+s5cem2g== X-Received: by 2002:a05:600c:280b:b0:401:38dc:8916 with SMTP id m11-20020a05600c280b00b0040138dc8916mr1690704wmb.10.1695196014842; Wed, 20 Sep 2023 00:46:54 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id a24-20020a05600c225800b00402d7105035sm1167853wmm.26.2023.09.20.00.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 00:46:54 -0700 (PDT) Date: Wed, 20 Sep 2023 09:46:53 +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 4/7] RISC-V: KVM: Allow Zicond extension for Guest/VM Message-ID: <20230920-be44cc5bd0f749a1137d103c@orel> References: <20230919035343.1399389-1-apatel@ventanamicro.com> <20230919035343.1399389-5-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230919035343.1399389-5-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 00:47:55 -0700 (PDT) On Tue, Sep 19, 2023 at 09:23:40AM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable Zicond extension for Guest/VM. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu_onereg.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h > index e030c12c7dfc..35ceb38a4eff 100644 > --- a/arch/riscv/include/uapi/asm/kvm.h > +++ b/arch/riscv/include/uapi/asm/kvm.h > @@ -139,6 +139,7 @@ enum KVM_RISCV_ISA_EXT_ID { > KVM_RISCV_ISA_EXT_ZIHPM, > KVM_RISCV_ISA_EXT_SMSTATEEN, > KVM_RISCV_ISA_EXT_XVENTANACONDOPS, > + KVM_RISCV_ISA_EXT_ZICOND, > KVM_RISCV_ISA_EXT_MAX, > }; > > diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c > index 17a847a1114b..d3ca4969c985 100644 > --- a/arch/riscv/kvm/vcpu_onereg.c > +++ b/arch/riscv/kvm/vcpu_onereg.c > @@ -47,6 +47,7 @@ static const unsigned long kvm_isa_ext_arr[] = { > KVM_ISA_EXT_ARR(ZICBOM), > KVM_ISA_EXT_ARR(ZICBOZ), > KVM_ISA_EXT_ARR(ZICNTR), > + KVM_ISA_EXT_ARR(ZICOND), > KVM_ISA_EXT_ARR(ZICSR), > KVM_ISA_EXT_ARR(ZIFENCEI), > KVM_ISA_EXT_ARR(ZIHINTPAUSE), > @@ -95,6 +96,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext) > case KVM_RISCV_ISA_EXT_ZBB: > case KVM_RISCV_ISA_EXT_ZBS: > case KVM_RISCV_ISA_EXT_ZICNTR: > + case KVM_RISCV_ISA_EXT_ZICOND: > case KVM_RISCV_ISA_EXT_ZICSR: > case KVM_RISCV_ISA_EXT_ZIFENCEI: > case KVM_RISCV_ISA_EXT_ZIHINTPAUSE: > -- > 2.34.1 > Reviewed-by: Andrew Jones