qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/4] RISC-V Smstateen support
@ 2022-09-19  6:29 Mayuresh Chitale
  2022-09-19  6:29 ` [PATCH v9 1/4] target/riscv: Add smstateen support Mayuresh Chitale
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Mayuresh Chitale @ 2022-09-19  6:29 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv; +Cc: Mayuresh Chitale, alistair.francis

This series adds support for the Smstateen specification which provides a
mechanism to plug the potential covert channels which are opened by extensions
that add to processor state that may not get context-switched. Currently access
to *envcfg registers and floating point(fcsr) is controlled via smstateen.

These patches can also be found on riscv_smstateen_v9 branch at:
https://github.com/mdchitale/qemu.git

Changes in v9:
- Rebase to latest riscv-to-apply.next
- Add reviewed by in patches 2 and 4

Changes in v8:
- Rebase to latest riscv-to-apply.next
- Fix m-mode check for hstateen
- Fix return exception type for VU mode
- Improve commit description for patch3

Changes in v7:
- Update smstateen check as per discussion on the following issue:
  https://github.com/riscv/riscv-state-enable/issues/9
- Drop the smstateen AIA patch for now.
- Indentation and other fixes

Changes in v6:
- Sync with latest riscv-to-apply.next
- Make separate read/write ops for m/h/s/stateen1/2/3 regs
- Add check for mstateen.staten when reading or using h/s/stateen regs
- Add smstateen fcsr check for all floating point operations
- Move knobs to enable smstateen in a separate patch.

Changes in v5:
- Fix the order in which smstateen extension is added to the
  isa_edata_arr as
described in rule #3 the comment.

Changes in v4:
- Fix build issue with riscv32/riscv64-linux-user targets

Changes in v3:
- Fix coding style issues
- Fix *stateen0h index calculation

Changes in v2:
- Make h/s/envcfg bits in m/h/stateen registers as writeable by default.

Mayuresh Chitale (4):
  target/riscv: Add smstateen support
  target/riscv: smstateen check for h/s/envcfg
  target/riscv: smstateen check for fcsr
  target/riscv: smstateen knobs

 target/riscv/cpu.c                        |   2 +
 target/riscv/cpu.h                        |   4 +
 target/riscv/cpu_bits.h                   |  37 ++
 target/riscv/csr.c                        | 471 +++++++++++++++++++++-
 target/riscv/insn_trans/trans_rvf.c.inc   |  40 +-
 target/riscv/insn_trans/trans_rvzfh.c.inc |  12 +
 target/riscv/machine.c                    |  21 +
 7 files changed, 583 insertions(+), 4 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-10-01 14:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19  6:29 [PATCH v9 0/4] RISC-V Smstateen support Mayuresh Chitale
2022-09-19  6:29 ` [PATCH v9 1/4] target/riscv: Add smstateen support Mayuresh Chitale
2022-09-29  0:57   ` weiwei
2022-09-29  1:43     ` Alistair Francis
2022-10-01 13:57       ` mchitale
2022-09-19  6:29 ` [PATCH v9 2/4] target/riscv: smstateen check for h/s/envcfg Mayuresh Chitale
2022-09-19  6:29 ` [PATCH v9 3/4] target/riscv: smstateen check for fcsr Mayuresh Chitale
2022-09-29  1:09   ` weiwei
2022-10-01 13:58     ` mchitale
2022-09-19  6:29 ` [PATCH v9 4/4] target/riscv: smstateen knobs Mayuresh Chitale
2022-09-29  1:44   ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).