Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2544427rbb; Wed, 28 Feb 2024 05:24:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUy1m7yPGEQLpwsf/MMYCfYhE6/iTeXp28+d0wX5c44z36MKbO4fwIRus8jGqfr+meB1Tp0sJiaR5PfAabDrRqjHWODmKXG+9eThJ0d8A== X-Google-Smtp-Source: AGHT+IECZRpjZff1jsgsvgqHZ8M2GVbNZ8DQxzbce6jXAvGO4Hdx5MavJBDo22Hpwe7awgQcfUI5 X-Received: by 2002:a17:902:b08e:b0:1dc:92a7:f2f0 with SMTP id p14-20020a170902b08e00b001dc92a7f2f0mr9625101plr.23.1709126645854; Wed, 28 Feb 2024 05:24:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709126645; cv=pass; d=google.com; s=arc-20160816; b=AgCJY9ZZkKRBYrY/a3yNVC4II6i5/GmnHDcb45Z0ZFJtfuOhb0wu2CLuKP3HRMiyBV 3kjJj4Z2FSUcTuo36MNThMRj/P0LFNUyL0PI9FXa2BM8M+Z1MXGT2UzuiF+91SonJk0x pVT+nevxc8mboOWTbSzscKxqBElgaboWjPi9JOfxoVcYxBoWcOf6lYfUMZTX/qRedILM Pc9cnWUXuOvWXl9VL0vR7d0Q5Ou8DjPEBJ4GCY0wHMCmHlVH3vLkB+pxZFLBYIglR0vn 2PtttZIf3HZVElhpvzUQuCaRpvmQvPvLQkddwXVc4tty77YJkbrRWbSa2U9Do1UCK5m6 5xUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FODdgKK2rthi98pSiTYr1xV3lmm83pq/eRUzwYsWbyA=; fh=M6LmEOnUpExBoS8Kn5SS5o/+7q1XnRsuUJJkG9PFD6k=; b=YRTUEfszUWmEM6I1eMJE1ypaCIZ0ff1j4ycQRJ6F/uO+L3oVZnEZNMhpOGmufT4ky6 ahLWEsWefaYg51xOexPSGw6wfauD92lJHSDqeNe2273Rktm4lJXaVrA/plnKSNGEsIkp XHjoX48JoW+YD50kTfSbyW9abd+BV8L4l5zeQlVh/BOF05/kb2E0oGI3pCcY/O/4TVOf 7ujS8Au6WKtE2zDA5B0btEbNANWNnj9dFBECcDQicTLICvrZbxbioTnkPF5EqKymNZQI 1p8QI0IQQgT6SvtovF64cNLj9quLSi98Fr8GRk2V+Vssl07XEl7WbMUS/yfAzm1NSCcX eZfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=N0jgYr+8; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-85069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85069-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p23-20020a1709027ed700b001dc8ebc1a9csi3234936plb.457.2024.02.28.05.24.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 05:24:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=N0jgYr+8; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-85069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85069-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 83141B27347 for ; Wed, 28 Feb 2024 13:10:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D61014C58C; Wed, 28 Feb 2024 13:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="N0jgYr+8" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A448314A4C9 for ; Wed, 28 Feb 2024 13:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709125807; cv=none; b=PlX5HSFOYf1pN1M7IoRoo3P0vOwVQKTDzMuJ/A4Qweb/3lJCQ716WKytQfqmRjl3FJmP3swYAfXHnt708DCvNtthFRKE2Pc84c9ncxVvz4RyCtroFTMsqi2hT3Vj1gEkTlIjlhjxi222iLa0/uxfqlLKF7oqZZQMEW3a90hikk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709125807; c=relaxed/simple; bh=DWcNsJpw70dUqdDXiZP1i1pmFUT+Xfz8X2cIrud2GCg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZjtU8vQupJOMmngPfcKPSN121bRzW3Da8E3va7dteO5/7ZOCl1qzwUIn7sp5PKfuveZdIEPG2f64QAE9oKlwT7e09+n9Mh3gS+3/7GTf4XktsRmF4g9hZ56f+Z4Nnn9ZnpuloO93V/4ZJkLV4opVyTyrVq5OCreGyVNy5xZg7uI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=N0jgYr+8; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a3e7f7b3d95so639600066b.3 for ; Wed, 28 Feb 2024 05:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1709125804; x=1709730604; 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=FODdgKK2rthi98pSiTYr1xV3lmm83pq/eRUzwYsWbyA=; b=N0jgYr+81zSQ75AvFojHnG5k8lBRMfwzUt8QGLyFL8n6YpqhseIAzB9Q17Z7EywUEA rGXF6wOn1V/0DyhD12Rt15o7FwlpIhKyG7tkugva/zrbueLWDK7RjGNriXVPV1E4ktR3 OVygJlbTcGtzO+lIq3VHUjAS0P5HxHbheMynEkhGUsQWxMHwswpOvoQsUvfroDK3HoZG khjr7sMvUF8Q0uFIXTS0CDM+/rkLwNrmPNULHp1ZbKX+Si4ZPeVHUmS6iZj14HPHkEv+ izh7lNDPGxfempfppTznDYS16KRbK7BkQnmA96q/znQV80asTyCT1MynYySuG48k9epy B1wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709125804; x=1709730604; 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=FODdgKK2rthi98pSiTYr1xV3lmm83pq/eRUzwYsWbyA=; b=IwHn45OrI/W0QY8yQDm4FoomkoXE69VOtoAQgxjS15poQLpsTXMer6MFtw1eVX4TbW gY2oj/SHh6eaFHQHmLe8Va4aFWGcrsBP57As1fcTVEhVTOuDBIcSb/yFuaBwS/QGrq5O dhSfvT259UHkgASVwesgbZSxYF4WMnvFzh+u6nmWe9MqJite02DhItMZcQUr69F2t7Be nbWEGBJhnDVz8/Qc/hlrPq1Eywve0EAtOI6654/Hkt6iSPE6Qv52joPnkT4ZLCdD7T/L TzWdOR+49wiGcu1jhcO2UOGwQu0gQiuevc3wfqtJw21rLup7cTzycgdVxi3ti073qn7x c/QQ== X-Forwarded-Encrypted: i=1; AJvYcCVA/tCeSgOm2fY+URYA2X95JkgJdeDUWubQhBE0j7DhVaPILMqZ7G937W3lw1keWSb1Q6f14Mi92qa4WzwlizjhS14z1GXlcWoH3ifG X-Gm-Message-State: AOJu0Yw0vq4RmdcqQMQAiIAp162mdrIi7c3KA3ukURfJNdQ7x/0xyb/d GeqqaHlOL5c2Z5rwUflXtc0zrp2WmpcnAdUWw+JyjZe52UIQfROiJCsbR7LExjc= X-Received: by 2002:a17:906:ecaf:b0:a43:a1b6:67a7 with SMTP id qh15-20020a170906ecaf00b00a43a1b667a7mr3790245ejb.73.1709125804046; Wed, 28 Feb 2024 05:10:04 -0800 (PST) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id ty6-20020a170907c70600b00a3f27031d7bsm1845582ejc.104.2024.02.28.05.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 05:10:03 -0800 (PST) Date: Wed, 28 Feb 2024 14:10:02 +0100 From: Andrew Jones To: Anup Patel Cc: Paolo Bonzini , Atish Patra , Shuah Khan , Palmer Dabbelt , Paul Walmsley , Anup Patel , 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/5] RISC-V: KVM: Allow Zacas extension for Guest/VM Message-ID: <20240228-0e0165118517dc2a94e60941@orel> References: <20240214123757.305347-1-apatel@ventanamicro.com> <20240214123757.305347-5-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240214123757.305347-5-apatel@ventanamicro.com> On Wed, Feb 14, 2024 at 06:07:56PM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable Zacas 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 f8aa9f2ace95..37fb0f70b3e5 100644 > --- a/arch/riscv/include/uapi/asm/kvm.h > +++ b/arch/riscv/include/uapi/asm/kvm.h > @@ -167,6 +167,7 @@ enum KVM_RISCV_ISA_EXT_ID { > KVM_RISCV_ISA_EXT_ZVFHMIN, > KVM_RISCV_ISA_EXT_ZFA, > KVM_RISCV_ISA_EXT_ZTSO, > + KVM_RISCV_ISA_EXT_ZACAS, > KVM_RISCV_ISA_EXT_MAX, > }; > > diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c > index 38f5cf286087..f4a6124d25c9 100644 > --- a/arch/riscv/kvm/vcpu_onereg.c > +++ b/arch/riscv/kvm/vcpu_onereg.c > @@ -40,6 +40,7 @@ static const unsigned long kvm_isa_ext_arr[] = { > KVM_ISA_EXT_ARR(SVINVAL), > KVM_ISA_EXT_ARR(SVNAPOT), > KVM_ISA_EXT_ARR(SVPBMT), > + KVM_ISA_EXT_ARR(ZACAS), > KVM_ISA_EXT_ARR(ZBA), > KVM_ISA_EXT_ARR(ZBB), > KVM_ISA_EXT_ARR(ZBC), > @@ -118,6 +119,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext) > case KVM_RISCV_ISA_EXT_SSTC: > case KVM_RISCV_ISA_EXT_SVINVAL: > case KVM_RISCV_ISA_EXT_SVNAPOT: > + case KVM_RISCV_ISA_EXT_ZACAS: > case KVM_RISCV_ISA_EXT_ZBA: > case KVM_RISCV_ISA_EXT_ZBB: > case KVM_RISCV_ISA_EXT_ZBC: > -- > 2.34.1 > Reviewed-by: Andrew Jones