From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH 1/1] target/riscv: enable floating point unit
Date: Wed, 18 Sep 2024 17:49:26 +0200 [thread overview]
Message-ID: <620daf0d-caf8-4fe5-901e-2abadb751392@canonical.com> (raw)
In-Reply-To: <20240918-4e2df3f0cabdb8002d7315d9@orel>
On 18.09.24 15:56, Andrew Jones wrote:
> Thanks Heinrich, I had also forgotten that distinction. So the last
> question is whether or not we want to reset mstatus.FS to 1 instead of 3,
> as is done in this patch.
>
> Thanks,
> drew
If the FD flag set to 3 (Dirty) indicates that "the corresponding state
has potentially been modified since the last context save". Upon context
switches the value of the floating point registers has to be saved.
The value 1 (Initial) implies that saving the registers on a context
change is not needed.
3 (Dirty) is the safest choice. This is why OpenSBI is also using it.
For reference:
3.1.6.6. Extension Context Status in mstatus Register
The RISC-V Instruction Set Manual: Volume II - Privileged Architecture
Version 2024-04-11
Best regards
Heinrich
WARNING: multiple messages have this Message-ID (diff)
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Bin Meng <bmeng.cn@gmail.com>, Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] target/riscv: enable floating point unit
Date: Wed, 18 Sep 2024 17:49:26 +0200 [thread overview]
Message-ID: <620daf0d-caf8-4fe5-901e-2abadb751392@canonical.com> (raw)
In-Reply-To: <20240918-4e2df3f0cabdb8002d7315d9@orel>
On 18.09.24 15:56, Andrew Jones wrote:
> Thanks Heinrich, I had also forgotten that distinction. So the last
> question is whether or not we want to reset mstatus.FS to 1 instead of 3,
> as is done in this patch.
>
> Thanks,
> drew
If the FD flag set to 3 (Dirty) indicates that "the corresponding state
has potentially been modified since the last context save". Upon context
switches the value of the floating point registers has to be saved.
The value 1 (Initial) implies that saving the registers on a context
change is not needed.
3 (Dirty) is the safest choice. This is why OpenSBI is also using it.
For reference:
3.1.6.6. Extension Context Status in mstatus Register
The RISC-V Instruction Set Manual: Volume II - Privileged Architecture
Version 2024-04-11
Best regards
Heinrich
WARNING: multiple messages have this Message-ID (diff)
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Bin Meng <bmeng.cn@gmail.com>, Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] target/riscv: enable floating point unit
Date: Wed, 18 Sep 2024 17:49:26 +0200 [thread overview]
Message-ID: <620daf0d-caf8-4fe5-901e-2abadb751392@canonical.com> (raw)
In-Reply-To: <20240918-4e2df3f0cabdb8002d7315d9@orel>
On 18.09.24 15:56, Andrew Jones wrote:
> Thanks Heinrich, I had also forgotten that distinction. So the last
> question is whether or not we want to reset mstatus.FS to 1 instead of 3,
> as is done in this patch.
>
> Thanks,
> drew
If the FD flag set to 3 (Dirty) indicates that "the corresponding state
has potentially been modified since the last context save". Upon context
switches the value of the floating point registers has to be saved.
The value 1 (Initial) implies that saving the registers on a context
change is not needed.
3 (Dirty) is the safest choice. This is why OpenSBI is also using it.
For reference:
3.1.6.6. Extension Context Status in mstatus Register
The RISC-V Instruction Set Manual: Volume II - Privileged Architecture
Version 2024-04-11
Best regards
Heinrich
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-09-18 15:49 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 18:16 [PATCH 1/1] target/riscv: enable floating point unit Heinrich Schuchardt
2024-09-17 12:13 ` Andrew Jones
2024-09-17 13:28 ` Heinrich Schuchardt
2024-09-17 14:49 ` Andrew Jones
2024-09-17 16:45 ` Heinrich Schuchardt
2024-09-17 16:45 ` Heinrich Schuchardt
2024-09-17 16:45 ` Heinrich Schuchardt
2024-09-18 6:05 ` Andrew Jones
2024-09-18 6:05 ` Andrew Jones
2024-09-18 6:05 ` Andrew Jones
2024-09-18 11:10 ` Peter Maydell
2024-09-18 11:10 ` Peter Maydell
2024-09-18 11:10 ` Peter Maydell
2024-09-18 13:06 ` Heinrich Schuchardt
2024-09-18 13:06 ` Heinrich Schuchardt
2024-09-18 13:06 ` Heinrich Schuchardt
2024-09-18 13:12 ` Peter Maydell
2024-09-18 13:12 ` Peter Maydell
2024-09-18 13:12 ` Peter Maydell
2024-09-18 13:49 ` Heinrich Schuchardt
2024-09-18 13:49 ` Heinrich Schuchardt
2024-09-18 13:49 ` Heinrich Schuchardt
2024-09-18 13:56 ` Andrew Jones
2024-09-18 13:56 ` Andrew Jones
2024-09-18 13:56 ` Andrew Jones
2024-09-18 15:49 ` Heinrich Schuchardt [this message]
2024-09-18 15:49 ` Heinrich Schuchardt
2024-09-18 15:49 ` Heinrich Schuchardt
2024-09-18 15:32 ` Peter Maydell
2024-09-18 15:32 ` Peter Maydell
2024-09-18 15:32 ` Peter Maydell
2024-09-18 16:27 ` Heinrich Schuchardt
2024-09-18 16:27 ` Heinrich Schuchardt
2024-09-18 16:27 ` Heinrich Schuchardt
2024-10-08 0:45 ` Alistair Francis
2024-10-08 0:45 ` Alistair Francis
2024-10-08 0:45 ` Alistair Francis
2024-09-18 14:38 ` Richard Henderson
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=620daf0d-caf8-4fe5-901e-2abadb751392@canonical.com \
--to=heinrich.schuchardt@canonical.com \
--cc=kvm-riscv@lists.infradead.org \
/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.