All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Chiu <tchiu@tenstorrent.com>
To: Samuel Holland <samuel.holland@sifive.com>
Cc: Paul Walmsley <pjw@kernel.org>, Anup Patel <anup@brainfault.org>,
	Atish Patra <atish.patra@linux.dev>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	linux-kernel@vger.kernel.org, kvm-riscv@lists.infradead.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/3] RISC-V: KVM: Decouple vector prctl state from VM ISA
Date: Tue, 13 Oct 2026 11:58:12 -0500	[thread overview]
Message-ID: <as5jJCqsRf6kNOAS@Tao-Chiu's-Mac> (raw)
In-Reply-To: <20261007085126.222688-4-samuel.holland@sifive.com>

On Wed, Oct 07, 2026 at 01:51:18AM -0700, Samuel Holland wrote:
> The ability to prevent userspace from executing vector instructions was
> provided as a escape hatch for software that was broken by adding vector
> state to the signal context. This was hooked up to KVM so a process that
> could not use V in userspace also could not create a KVM VM with V in
> the ISA.
> 
> Remove this connection as it does not really help with any compatibility
> concerns. A VMM that does not understand V will not include it in the
> virtual machine's ISA.
> 
> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>

Reviewed-by: Andy Chiu <tchiu@tenstorrent.com>

> ---
> 
>  arch/riscv/kvm/isa.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/riscv/kvm/isa.c b/arch/riscv/kvm/isa.c
> index 971f44655100a..447c778bf850e 100644
> --- a/arch/riscv/kvm/isa.c
> +++ b/arch/riscv/kvm/isa.c
> @@ -9,7 +9,6 @@
>  #include <linux/nospec.h>
>  #include <linux/pgtable.h>
>  #include <asm/kvm_isa.h>
> -#include <asm/vector.h>
>  
>  #define KVM_ISA_EXT_ARR(ext)		\
>  [KVM_RISCV_ISA_EXT_##ext] = RISCV_ISA_EXT_##ext
> @@ -159,8 +158,6 @@ bool kvm_riscv_isa_enable_allowed(unsigned long ext)
>  		 * Guest OS can use Svadu only when host OS enable Svadu.
>  		 */
>  		return arch_has_hw_pte_young();
> -	case KVM_RISCV_ISA_EXT_V:
> -		return riscv_v_vstate_ctrl_user_allowed();
>  	default:
>  		break;
>  	}
> -- 
> 2.52.0
> 

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Andy Chiu <tchiu@tenstorrent.com>
To: Samuel Holland <samuel.holland@sifive.com>
Cc: Paul Walmsley <pjw@kernel.org>, Anup Patel <anup@brainfault.org>,
	Atish Patra <atish.patra@linux.dev>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	linux-kernel@vger.kernel.org, kvm-riscv@lists.infradead.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/3] RISC-V: KVM: Decouple vector prctl state from VM ISA
Date: Tue, 13 Oct 2026 11:58:12 -0500	[thread overview]
Message-ID: <as5jJCqsRf6kNOAS@Tao-Chiu's-Mac> (raw)
In-Reply-To: <20261007085126.222688-4-samuel.holland@sifive.com>

On Wed, Oct 07, 2026 at 01:51:18AM -0700, Samuel Holland wrote:
> The ability to prevent userspace from executing vector instructions was
> provided as a escape hatch for software that was broken by adding vector
> state to the signal context. This was hooked up to KVM so a process that
> could not use V in userspace also could not create a KVM VM with V in
> the ISA.
> 
> Remove this connection as it does not really help with any compatibility
> concerns. A VMM that does not understand V will not include it in the
> virtual machine's ISA.
> 
> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>

Reviewed-by: Andy Chiu <tchiu@tenstorrent.com>

> ---
> 
>  arch/riscv/kvm/isa.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/riscv/kvm/isa.c b/arch/riscv/kvm/isa.c
> index 971f44655100a..447c778bf850e 100644
> --- a/arch/riscv/kvm/isa.c
> +++ b/arch/riscv/kvm/isa.c
> @@ -9,7 +9,6 @@
>  #include <linux/nospec.h>
>  #include <linux/pgtable.h>
>  #include <asm/kvm_isa.h>
> -#include <asm/vector.h>
>  
>  #define KVM_ISA_EXT_ARR(ext)		\
>  [KVM_RISCV_ISA_EXT_##ext] = RISCV_ISA_EXT_##ext
> @@ -159,8 +158,6 @@ bool kvm_riscv_isa_enable_allowed(unsigned long ext)
>  		 * Guest OS can use Svadu only when host OS enable Svadu.
>  		 */
>  		return arch_has_hw_pte_young();
> -	case KVM_RISCV_ISA_EXT_V:
> -		return riscv_v_vstate_ctrl_user_allowed();
>  	default:
>  		break;
>  	}
> -- 
> 2.52.0
> 

-- 
kvm-riscv mailing list
kvm-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

  reply	other threads:[~2026-10-13 16:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  8:51 [PATCH 0/3] riscv: Deprecate userspace vector control interfaces Samuel Holland
2026-10-07  8:51 ` Samuel Holland
2026-10-07  8:51 ` [PATCH 1/3] riscv: Drop CONFIG_RISCV_ISA_V_DEFAULT_ENABLE Samuel Holland
2026-10-07  8:51   ` Samuel Holland
2026-10-13 16:59   ` Andy Chiu
2026-10-13 16:59     ` Andy Chiu
2026-10-07  8:51 ` [PATCH 2/3] riscv: Deprecate vector state prctl/sysctl Samuel Holland
2026-10-07  8:51   ` Samuel Holland
2026-10-13 16:57   ` Andy Chiu
2026-10-13 16:57     ` Andy Chiu
2026-10-07  8:51 ` [PATCH 3/3] RISC-V: KVM: Decouple vector prctl state from VM ISA Samuel Holland
2026-10-07  8:51   ` Samuel Holland
2026-10-13 16:58   ` Andy Chiu [this message]
2026-10-13 16:58     ` Andy Chiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='as5jJCqsRf6kNOAS@Tao-Chiu'\''s-Mac' \
    --to=tchiu@tenstorrent.com \
    --cc=anup@brainfault.org \
    --cc=atish.patra@linux.dev \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=samuel.holland@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.