From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DD0DC7EE37 for ; Thu, 8 Jun 2023 13:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236818AbjFHN64 (ORCPT ); Thu, 8 Jun 2023 09:58:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236528AbjFHN6m (ORCPT ); Thu, 8 Jun 2023 09:58:42 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 693BA269F for ; Thu, 8 Jun 2023 06:58:39 -0700 (PDT) Received: from ip5b412278.dynamic.kabel-deutschland.de ([91.65.34.120] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q7G9Y-0006MK-JG; Thu, 08 Jun 2023 15:58:16 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: linux-riscv@lists.infradead.org, palmer@dabbelt.com, anup@brainfault.org, atishp@atishpatra.org, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org Cc: vineetg@rivosinc.com, greentime.hu@sifive.com, guoren@linux.alibaba.com, Andy Chiu , Paul Walmsley , Albert Ou , Andrew Jones , Conor Dooley , Lad Prabhakar , Jisheng Zhang , Liao Chang , Vincent Chen , Guo Ren , =?ISO-8859-1?Q?Bj=F6rn_T=F6pel?= , Xianting Tian , Mattias Nissler , Andy Chiu Subject: Re: [PATCH -next v21 11/27] riscv: Allocate user's vector context in the first-use trap Date: Thu, 08 Jun 2023 15:58:15 +0200 Message-ID: <1917725.CQOukoFCf9@diego> In-Reply-To: <20230605110724.21391-12-andy.chiu@sifive.com> References: <20230605110724.21391-1-andy.chiu@sifive.com> <20230605110724.21391-12-andy.chiu@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Am Montag, 5. Juni 2023, 13:07:08 CEST schrieb Andy Chiu: > Vector unit is disabled by default for all user processes. Thus, a > process will take a trap (illegal instruction) into kernel at the first > time when it uses Vector. Only after then, the kernel allocates V > context and starts take care of the context for that user process. > > Suggested-by: Richard Henderson > Link: https://lore.kernel.org/r/3923eeee-e4dc-0911-40bf-84c34aee962d@linaro.org > Signed-off-by: Andy Chiu Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner