- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma,
hfence.vvma and hfence.gvma except extension check
- do nothing other than extension check for sfence.w.inval and sfence.inval.ir
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target
o describe changes
v3:
* drop "x-" in exposed properties
v2:
* add extension check for svnapot and svpbmt
Guo Ren (1):
target/riscv: Ignore reserved bits in PTE for RV64
Weiwei Li (4):
target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE
target/riscv: add support f
For non-leaf PTEs, the D, A, and U bits are reserved for future standard use.
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/cpu_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/riscv/cpu_helper.c b/target/riscv
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
need to ignore them. They cannot be a part of ppn.
1: The RISC-V Instruction Set Manual, Volume II: Privileged Architecture
4.4 Sv39: Page-Based 39-bit Virtual-Memory System
4.5 Sv48: Page-Based 48-bit Virtual
- update extension check REQUIRE_ZFINX_OR_F
- update single float point register read/write
- disable nanbox_s check
Co-authored-by: ardxwe
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Richard Henderson
---
target/riscv/fpu_helper.c | 89
Co-authored-by: ardxwe
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Richard Henderson
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 12
target/riscv/cpu.h | 4
target/riscv/translate.c | 8
3 files changed, 24 insertions
- update extension check REQUIRE_ZHINX_OR_ZFH and
REQUIRE_ZFH_OR_ZFHMIN_OR_ZHINX_OR_ZHINXMIN
- update half float point register read/write
- disable nanbox_h check
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Richard Henderson
---
target/riscv/fpu_helper.c
Co-authored-by: ardxwe
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Richard Henderson
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 7006e6647b..e96d0a73f5
-- update extension check REQUIRE_ZDINX_OR_D
-- update double float point register read/write
Co-authored-by: ardxwe
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Richard Henderson
---
target/riscv/insn_trans/trans_rvd.c.inc | 285 +---
target
tial implemention as suggested
Weiwei Li (6):
target/riscv: add cfg properties for zfinx, zdinx and zhinx{min}
target/riscv: hardwire mstatus.FS to zero when enable zfinx
target/riscv: add support for zfinx
target/riscv: add support for zdinx
target/riscv: add support for zhinx/zhinxmin
target
Co-authored-by: ardxwe
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Alistair Francis
---
target/riscv/cpu_helper.c | 6 +-
target/riscv/csr.c| 25 -
target/riscv/translate.c | 4
3 files changed, 29 insertions(+), 6 deletions
在 2022/2/1 上午11:31, Alistair Francis 写道:
On Fri, Jan 28, 2022 at 7:11 PM Weiwei Li wrote:
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
need to ignore them. They cannot be a part of ppn.
1: The RISC-V Instruction Set Manual, Volume II: Privileged
在 2022/2/1 下午2:22, Alistair Francis 写道:
On Fri, Jan 28, 2022 at 6:57 PM Weiwei Li wrote:
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by
heck for svnapot and svpbmt
Guo Ren (1):
target/riscv: Ignore reserved bits in PTE for RV64
Weiwei Li (4):
target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE
target/riscv: add support for svnapot extension
target/riscv: add support for svinval extension
target/riscv: ad
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
need to ignore them. They cannot be a part of ppn.
1: The RISC-V Instruction Set Manual, Volume II: Privileged Architecture
4.4 Sv39: Page-Based 39-bit Virtual-Memory System
4.5 Sv48: Page-Based 48-bit Virtual
For non-leaf PTEs, the D, A, and U bits are reserved for future standard use.
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/cpu_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/riscv
- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma,
hfence.vvma and hfence.gvma except extension check
- do nothing other than extension check for sfence.w.inval and sfence.inval.ir
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/cpu.c| 2 ++
target/riscv/cpu_bits.h | 1 +
target
在 2022/2/3 上午6:25, Alistair Francis 写道:
On Wed, Feb 2, 2022 at 3:24 AM Weiwei Li wrote:
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by
For non-leaf PTEs, the D, A, and U bits are reserved for future standard use.
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/cpu_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/riscv
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c| 2 ++
target/riscv
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
Reviewed-by: Ali
- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma,
hfence.vvma and hfence.gvma except extension check
- do nothing other than extension check for sfence.w.inval and sfence.inval.ir
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
Reviewed-by
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
need to ignore them. They cannot be a part of ppn.
1: The RISC-V Instruction Set Manual, Volume II: Privileged Architecture
4.4 Sv39: Page-Based 39-bit Virtual-Memory System
4.5 Sv48: Page-Based 48-bit Virtual
posed properties
v2:
* add extension check for svnapot and svpbmt
Guo Ren (1):
target/riscv: Ignore reserved bits in PTE for RV64
Weiwei Li (4):
target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE
target/riscv: add support for svnapot extension
target/riscv: add support for svinva
eption write_menvcfgh(CPURISCVState *env, int csrno,
+ target_ulong val)
+{
+uint64_t valh = (uint64_t)val << 32;
+env->menvcfg |= valh;
+
The original high32 of menvcfg should be cleared before ' | ' valh.
Similar for henvcfgh.
Regards,
s,
write_mstatus, NULL,
Additional spaces before '=' seems to align with other '='s in near lines.
If you don't want to modify the previous lines, I think it's better to
align with the '=' of CSR_MSTATUS or doesn't add any additional spaces.
Regards,
Weiwei Li
Thanks for your comments.
在 2022/1/14 下午9:40, Anup Patel 写道:
On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote:
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c | 1 +
target/riscv/cpu.h | 1 +
target/riscv
在 2022/1/14 下午10:01, Anup Patel 写道:
On Fri, Jan 14, 2022 at 7:24 PM Weiwei Li wrote:
Thanks for your comments.
在 2022/1/14 下午9:40, Anup Patel 写道:
On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote:
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c
在 2022/1/14 下午9:59, Anup Patel 写道:
On Fri, Jan 14, 2022 at 7:11 AM Weiwei Li wrote:
It uses two PTE bits, but otherwise has no effect on QEMU, since QEMU is
sequentially consistent and doesn't model PMAs currently
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Tested-by:
- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma,
hfence.vvma and hfence.gvma except extension check
- do nothing other than extension check for sfence.w.inval and sfence.inval.ir
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/cpu_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 434a83e66a..d84cde424d 100644
--- a/target/riscv/cpu_helper.c
+++ b
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c| 2 ++
target/riscv/cpu.h| 1 +
target/riscv/cpu_bits.h | 1
nd
fourth commits
* improve commit messages to describe changes
v3:
* drop "x-" in exposed properties
v2:
* add extension check for svnapot and svpbmt
Weiwei Li (4):
target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE
target/riscv: add support for svnapot extension
target/ri
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bits check for inner PTE
- add reserved bits check for all PTE
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Test
在 2022/1/17 下午3:18, Guo Ren 写道:
On Sun, Jan 16, 2022 at 11:08 AM Weiwei Li wrote:
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bits check for inner PTE
- add res
在 2022/1/18 上午7:28, Alistair Francis 写道:
On Tue, Jan 11, 2022 at 1:57 PM Weiwei Li wrote:
- share it between target/arm and target/riscv
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Philippe Mathieu-Daudé
Do you mind fixing up the commit title?
Maybe something
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/cpu_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 26608ddf1c..1820188f41 100644
--- a/target/riscv/cpu_helper.c
+++ b
rved bits in PTE for RV64
Weiwei Li (4):
target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE
target/riscv: add support for svnapot extension
target/riscv: add support for svinval extension
target/riscv: add support for svpbmt extension
target/riscv/cpu.c |
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
need to ignore them. They cannot be a part of ppn.
1: The RISC-V Instruction Set Manual, Volume II: Privileged Architecture
4.4 Sv39: Page-Based 39-bit Virtual-Memory System
4.5 Sv48: Page-Based 48-bit Virtual
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Cc: Heiko Stuebner
Cc: Anup Patel
---
t
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Cc: Anup Patel
---
target/riscv/cpu.c| 2 ++
target/riscv/cpu.h| 1 +
target/riscv
- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma,
hfence.vvma and hfence.gvma except extension check
- do nothing other than extension check for sfence.w.inval and sfence.inval.ir
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target
在 2022/1/18 下午12:23, Alistair Francis 写道:
On Tue, Jan 11, 2022 at 1:53 PM Weiwei Li wrote:
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index
在 2022/1/18 下午12:40, Alistair Francis 写道:
On Tue, Jan 11, 2022 at 1:56 PM Weiwei Li wrote:
- reuse partial instructions of Zbb/Zbc extensions
- add brev8, packh, unzip, zip, etc.
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/bitmanip_helper.c
在 2022/1/18 下午12:36, Alistair Francis 写道:
On Tue, Jan 11, 2022 at 1:53 PM Weiwei Li wrote:
- add SEED CSR
- add USEED, SSEED fields for MSECCFG CSR
Co-authored-by: Ruibo Lu
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv
在 2022/1/18 下午12:21, Alistair Francis 写道:
On Tue, Jan 11, 2022 at 2:01 PM Weiwei Li wrote:
Co-authored-by: Ruibo Lu
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 446 ++
target/riscv
在 2022/1/18 下午12:41, Alistair Francis 写道:
On Tue, Jan 11, 2022 at 1:54 PM Weiwei Li wrote:
This patchset implements RISC-V scalar crypto extension v1.0.0 version
instructions.
Partial instructions are reused from B-extension.
Specification:
https://github.com/riscv/riscv-crypto
The port
在 2022/1/18 上午11:32, Anup Patel 写道:
On Tue, Jan 18, 2022 at 6:47 AM Weiwei Li wrote:
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Cc: Anup Patel
在 2022/1/18 上午11:35, Anup Patel 写道:
On Tue, Jan 18, 2022 at 6:47 AM Weiwei Li wrote:
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-o
在 2022/1/18 上午11:35, Anup Patel 写道:
On Tue, Jan 18, 2022 at 6:47 AM Weiwei Li wrote:
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-o
在 2022/1/18 下午7:04, Anup Patel 写道:
On Tue, Jan 18, 2022 at 2:40 PM Weiwei Li wrote:
在 2022/1/18 上午11:35, Anup Patel 写道:
On Tue, Jan 18, 2022 at 6:47 AM Weiwei Li wrote:
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent
在 2022/1/18 下午7:15, Guo Ren 写道:
On Tue, Jan 18, 2022 at 4:51 PM Anup Patel wrote:
On Tue, Jan 18, 2022 at 2:16 PM Guo Ren wrote:
On Tue, Jan 18, 2022 at 11:32 AM Anup Patel wrote:
On Tue, Jan 18, 2022 at 6:47 AM Weiwei Li wrote:
From: Guo Ren
Highest bits of PTE has been used for
- reuse partial instructions of zbc extension, update extension check for them
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/insn32.decode | 3 ++-
target/riscv/insn_trans/trans_rvb.c.inc | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff
- add xperm4 and xperm8 instructions
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/bitmanip_helper.c | 27 +
target/riscv/helper.h | 2 ++
target/riscv/insn32.decode | 4
target/riscv/insn_trans
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Acked-by: Alistair Francis
---
target/riscv/cpu.c | 23 +++
target/riscv/cpu.h | 13 +
2 files changed, 36 insertions(+)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 9bc25d3055..b487a8282c
p
* use aes related sbox array from crypto/aes.h
* move sm4_sbox to crypto/sm4.c, and share it with target/arm
Weiwei Li (14):
target/riscv: rvk: add cfg properties for zbk* and zk*
target/riscv: rvk: add support for zbkb extension
target/riscv: rvk: add support for zbkc extension
target/ri
- reuse partial instructions of zbb extension, update extension check for them
- add brev8, pack, packh, packw, unzip, zip instructions
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/bitmanip_helper.c | 53 +++
target/riscv/helper.h
- share it between target/arm and target/riscv
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis
---
crypto/meson.build | 1 +
crypto/sm4.c | 49 ++
include
- add aes32esmi, aes32esi, aes32dsmi and aes32dsi instructions
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 139
target/riscv/helper.h | 6 +
target/riscv/insn32
- add sha512sum0r, sha512sig0l, sha512sum1r, sha512sig1l, sha512sig0h and
sha512sig1h instructions
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 57
target/riscv/helper.h | 7
- add sha256sig0, sha256sig1, sha256sum0 and sha256sum1 instructions
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 31 +
target/riscv/helper.h | 5 +++
target/riscv/insn32.decode
- add sm3p0, sm3p1, sm4ed and sm4ks instructions
Co-authored-by: Ruibo Lu
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 49 +
target/riscv/helper.h | 6 +++
target/riscv/insn32.decode | 6
- add aes64dsm, aes64ds, aes64im, aes64es, aes64esm, aes64ks2, aes64ks1i
instructions
Co-authored-by: Ruibo Lu
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 136
target/riscv/helper.h
- add SEED CSR
- add USEED, SSEED fields for MSECCFG CSR
Co-authored-by: Ruibo Lu
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu_bits.h | 9 ++
target/riscv/csr.c | 64 +
target/riscv
- add sha512sum0, sha512sig0, sha512sum1 and sha512sig1 instructions
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/crypto_helper.c| 31 ++
target/riscv/helper.h | 5 +++
target/riscv/insn32.decode
Co-authored-by: Ruibo Lu
Co-authored-by: Zewen Ye
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
disas/riscv.c | 170 ++
1 file changed, 170 insertions(+)
diff --git a/disas/riscv.c b/disas/riscv.c
index 03c8dc9961..44a2c16a0b 100644
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index b487a8282c..04e8e8d3c6 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -694,7 +694,20
在 2022/1/21 上午8:35, Alistair Francis 写道:
On Wed, Jan 19, 2022 at 11:09 PM Weiwei Li wrote:
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Alistair Francis
Alistair
Thanks for your comments.
Regards,
Weiwei Li
---
target/riscv/cpu.c | 13 +
1 file
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
need to ignore them. They cannot be a part of ppn.
1: The RISC-V Instruction Set Manual, Volume II: Privileged Architecture
4.4 Sv39: Page-Based 39-bit Virtual-Memory System
4.5 Sv48: Page-Based 48-bit Virtual
(1):
target/riscv: Ignore reserved bits in PTE for RV64
Weiwei Li (4):
target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE
target/riscv: add support for svnapot extension
target/riscv: add support for svinval extension
target/riscv: add support for svpbmt extension
- add PTE_N bit
- add PTE_N bit check for inner PTE
- update address translation to support 64KiB continuous region (napot_bits = 4)
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/cpu.c| 2 ++
target/riscv/cpu_bits.h | 1 +
target
- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma,
hfence.vvma and hfence.gvma except extension check
- do nothing other than extension check for sfence.w.inval and sfence.inval.ir
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/cpu_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 2a921bedfd..a5bf07ccb6 100644
--- a/target/riscv/cpu_helper.c
+++ b
- add PTE_PBMT bits: It uses two PTE bits, but otherwise has no effect on QEMU,
since QEMU is sequentially consistent and doesn't model PMAs currently
- add PTE_PBMT bit check for inner PTE
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
Reviewed-by: Anup Patel
---
target/riscv/
在 2022/1/25 下午5:00, Guo Ren 写道:
On Tue, Jan 25, 2022 at 4:54 PM LIU Zhiwei wrote:
On 2022/1/25 16:40, Guo Ren wrote:
On Tue, Jan 25, 2022 at 4:34 PM LIU Zhiwei wrote:
On 2022/1/25 14:45, Weiwei Li wrote:
From: Guo Ren
Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we
re.
+if (ret == TLB_INVALID_MASK) {
+uint32_t exc = RISCV_EXCP_STORE_PAGE_FAULT;
+
+#ifndef CONFIG_USER_ONLY
+/* User-mode emulation does not have virtualisation... */
+if (riscv_cpu_virt_enabled(env)) {
+ exc = RISCV_EXCP_STORE_GUEST_AMO_ACCESS_FAULT;
+}
+
_UINTTL(env.senvcfg, RISCVCPU),
+VMSTATE_UINTTL(env.henvcfg, RISCVCPU),
+VMSTATE_UINTTL(env.henvcfgh, RISCVCPU),
+
+VMSTATE_END_OF_LIST()
+}
+};
+
const VMStateDescription vmstate_riscv_cpu = {
.name = "cpu",
.version_id = 3,
@@ -240,6 +265,7 @@ const VMStateDescription vmstate_riscv_cpu = {
&vmstate_vector,
&vmstate_pointermasking,
&vmstate_rv128,
+&vmstate_envcfg,
NULL
}
};
Regards,
Weiwei Li
It seems that target is miswritten to "targett" in commit message.
Regards,
Weiwei Li
在 2022/1/24 上午8:59, Alistair Francis 写道:
From: Alistair Francis
If the atomic operation fails we want to generate a MMU_DATA_STORE
access type so we can produce a RISCV_EXCP_STORE_AMO_ACCESS_FAU
;& !vext_elem_mask(v0, i)) {
-continue;
-}
-
k = 0;
while (k < nf) {
+if (!vm && !vext_elem_mask(v0, i)) {
+/* set masked-off elements to 1s */
+vext_set_elems_1s(vd, vma,(i + k * max_elems) * esz,
seems lack a space here. the same to following cases.
Regards,
Weiwei Li
get/riscv/insn_trans/trans_rvv.c.inc | 3 +++
target/riscv/internals.h| 5 +++--
target/riscv/translate.c| 2 ++
target/riscv/vector_helper.c| 8
6 files changed, 20 insertions(+), 2 deletions(-)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
diff
在 2022/3/17 下午4:38, ~eopxd 写道:
From: Yueh-Ting (eop) Chen
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/insn_trans/trans_rvv.c.inc | 2 ++
target/riscv/vector_helper.c| 3 +++
2 files changed, 5 insertions(+)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
在 2022/3/17 下午4:43, ~eopxd 写道:
From: Yueh-Ting (eop) Chen
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/insn_trans/trans_rvv.c.inc | 1 +
target/riscv/vector_helper.c| 7 +++
2 files changed, 8 insertions(+)
Reviewed-by: Weiwei Li
Regards,
Weiwei
在 2022/3/17 下午4:46, ~eopxd 写道:
From: Yueh-Ting (eop) Chen
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/insn_trans/trans_rvv.c.inc | 1 +
target/riscv/vector_helper.c| 10 ++
2 files changed, 11 insertions(+)
Reviewed-by: Weiwei Li
Regards
在 2022/3/17 下午4:52, ~eopxd 写道:
From: Yueh-Ting (eop) Chen
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/vector_helper.c | 26 --
1 file changed, 16 insertions(+), 10 deletions(-)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
diff --git a
(+)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
diff --git a/target/riscv/insn_trans/trans_rvv.c.inc
b/target/riscv/insn_trans/trans_rvv.c.inc
index 5cbf323c18..8fb8045957 100644
--- a/target/riscv/insn_trans/trans_rvv.c.inc
+++ b/target/riscv/insn_trans/trans_rvv.c.inc
@@ -2428,6 +2428,7 @@ static bool
在 2022/3/17 下午5:14, ~eopxd 写道:
From: Yueh-Ting (eop) Chen
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/insn_trans/trans_rvv.c.inc | 3 +++
target/riscv/vector_helper.c| 11 +++
2 files changed, 14 insertions(+)
Reviewed-by: Weiwei Li
vv_ma_all_1s' is added to enable the
behavior, it is default as disabled.
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/cpu.c | 1 +
1 file changed, 1 insertion(+)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index
(-)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
diff --git a/target/riscv/insn_trans/trans_rvv.c.inc
b/target/riscv/insn_trans/trans_rvv.c.inc
index 18ef9949ad..d853f9f2c4 100644
--- a/target/riscv/insn_trans/trans_rvv.c.inc
+++ b/target/riscv/insn_trans/trans_rvv.c.inc
@@ -3988,6 +3988,7 @@ static bool
(i + k * max_elems + 1) * esz);
+k++;
+continue;
There is another question here:
this function is reused by load&store. However vd is used as source for
store.
So we cannot set it without distinguish load and s
ast register should
be treated as tail elements.
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
Reviewed-by: Weiwei Li
Acked-by: Alistair Francis
---
target/riscv/insn_trans/trans_rvv.c.inc | 11 +
target/riscv/translate.c| 2 +
target/riscv/vector_helper.c|
d missing space
- Trigger `vma` when encountering vector load instructions and not in
vector stores
Instead of add is_load in the helper functions, maybe it's better to
just not set vta and vma for
vector store instructions in trans_rvv.
Regards,
Weiwei Li
Yueh-Ting (eop) Chen (9):
ta
(-)
Reviewed-by: Weiwei Li
Regards,
Weiwei Li
diff --git a/target/riscv/insn_trans/trans_rvv.c.inc
b/target/riscv/insn_trans/trans_rvv.c.inc
index df5a892150..a6daf20714 100644
--- a/target/riscv/insn_trans/trans_rvv.c.inc
+++ b/target/riscv/insn_trans/trans_rvv.c.inc
@@ -712,6 +712,7 @@ static
在 2022/5/14 上午12:09, Weiwei Li 写道:
在 2022/3/17 下午3:47, ~eopxd 写道:
From: Yueh-Ting (eop) Chen
Signed-off-by: eop Chen
Reviewed-by: Frank Chang
---
target/riscv/insn_trans/trans_rvv.c.inc | 5
target/riscv/vector_helper.c | 35 +
2 files changed
requires D
Why 'V requires D'? I know partial vector instructions require D,
However, I think they just like c.fsd
instruction requires D, not 'C requires D' or 'D requires C'. Is there
any rvv spec change I don't know?
Regards.
Weiwei Li
Because F/D/Z
在 2022/5/15 下午10:45, Tsukasa OI 写道:
On 2022/05/15 23:37, Weiwei Li wrote:
在 2022/5/15 上午10:56, Tsukasa OI 写道:
QEMU allowed inconsistent configurations that made floating point
arithmetic effectively unusable.
This commit adds certain checks for consistent FP arithmetic:
- F requires
rectly by cfg property, such as we can set cpu option to sifive-u34
with zfinx=true. This may not be a proper way to set cpu option,
However it's truly a legal command option, but configure an illegal
supported ISA which enable both f and zfinx.
Regards,
Weiwei Li
if (cpu-
- enable zb* extensions by default will make cpu types(such as sifive-u34)
implicitly support zb* extensions
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/riscv/cpu.c b/target
501 - 600 of 992 matches
Mail list logo