All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/5] RISC-V Smstateen support
@ 2022-07-21 15:31 Mayuresh Chitale
  2022-07-21 15:31 ` [PATCH v6 1/5] target/riscv: Add smstateen support Mayuresh Chitale
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Mayuresh Chitale @ 2022-07-21 15:31 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 plug potential covert channels which are opened by
extensions
that add to processor state that may not get context-switched. Currently
access to AIA registers, *envcfg registers and floating point(fcsr) is
controlled via smstateen.

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

The patch 4/5 (AIA) can be reviewed but not merged until the
bits reserved for AIA get re-defined.

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.

Anup Patel (1):
  target/riscv: Force disable extensions if priv spec version does not
    match
*** BLURB HERE ***

Mayuresh Chitale (5):
  target/riscv: Add smstateen support
  target/riscv: smstateen check for h/senvcfg
  target/riscv: smstateen check for fcsr
  target/riscv: smstateen check for AIA/IMSIC
  target/riscv: smstateen knobs

 target/riscv/cpu.c                        |   2 +
 target/riscv/cpu.h                        |   4 +
 target/riscv/cpu_bits.h                   |  37 ++
 target/riscv/csr.c                        | 703 +++++++++++++++++++++-
 target/riscv/insn_trans/trans_rvf.c.inc   |  38 +-
 target/riscv/insn_trans/trans_rvzfh.c.inc |   4 +
 target/riscv/machine.c                    |  21 +
 7 files changed, 804 insertions(+), 5 deletions(-)

-- 
2.25.1



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

end of thread, other threads:[~2022-07-29 12:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 15:31 [PATCH v6 0/5] RISC-V Smstateen support Mayuresh Chitale
2022-07-21 15:31 ` [PATCH v6 1/5] target/riscv: Add smstateen support Mayuresh Chitale
2022-07-22  0:31   ` Weiwei Li
2022-07-24 15:39     ` Mayuresh Chitale
2022-07-25  7:11       ` Weiwei Li
2022-07-28  5:39         ` Mayuresh Chitale
2022-07-21 15:31 ` [PATCH v6 2/5] target/riscv: smstateen check for h/senvcfg Mayuresh Chitale
2022-07-22  0:45   ` Weiwei Li
2022-07-28  6:41     ` Mayuresh Chitale
2022-07-28  7:59       ` Weiwei Li
2022-07-21 15:31 ` [PATCH v6 3/5] target/riscv: smstateen check for fcsr Mayuresh Chitale
2022-07-22  1:42   ` Weiwei Li
2022-07-24 15:49     ` Mayuresh Chitale
2022-07-25  7:23       ` Weiwei Li
2022-07-28  6:15         ` Mayuresh Chitale
2022-07-28  7:38           ` Weiwei Li
2022-07-28  8:09           ` Ben Dooks
2022-07-29 12:29             ` Mayuresh Chitale
2022-07-21 15:31 ` [PATCH v6 4/5] target/riscv: smstateen check for AIA/IMSIC Mayuresh Chitale
2022-07-22  1:45   ` Weiwei Li
2022-07-21 15:31 ` [PATCH v6 5/5] target/riscv: smstateen knobs Mayuresh Chitale
2022-07-22  1:47   ` Weiwei Li

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.